Just want to covert Jan to 01 (date format)
I can use array() but looking for another way...
array()
Any suggestion?>
Here is a modified version of the chosen answer:
getMonth("Feb") function getMonth(month) { d = new Date().toString().split(" ") d[1] = month d = new Date(d.join(' ')).getMonth()+1 if(!isNaN(d)) { return d } return -1; }