javascript - Is there a JQuery API for assigning the month name based on the number.? -


am working on sharepoint list, fetching date list, in format : 2013-03-25.

i have split date , assigned variable.

code.

var splitdate = resultregionarr[x].newsdate.split("-"); 

now, want know if there jquery api returns me string "march" on input of value "03" or splitdate[1].

thanks in advance.

var months = [ "january", "february", "march", "april",                "may", "june", "july", "august",                "september", "october", "november", "december" ];  var selectedmonthname = months[splitdate[1] - 1]; 

the - 1 optional. depending on input/output of splitdate[1].


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -