SyntaxFix
Write A Post
Hire A Developer
Questions
I usually used to make a function:
function getMonth(monthStr){ return new Date(monthStr+'-1-01').getMonth()+1 }
And call it like :
getMonth('Jan'); getMonth('Feb'); getMonth('Dec');