30
rated 0 times
[
34]
[
4]
/ answers: 1 / hits: 21177
/ 8 Years ago, tue, october 11, 2016, 12:00:00
It's possible to do this to get the localized full month name using native javascript.
var objDate = new Date(10/11/2009),
locale = en-us,
month = objDate.toLocaleString(locale, { month: long });
But this only gets the month number for a given date. I'd simply like to get the month name corresponding to a month number. For example, if I do getMonth(2)
it would return February
. How can I implement getMonth
using native javascript(no libraries like moment
)?
More From » date