Get localized month name using native JS
问题 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 )? 回答1: You are already close: