Created
August 6, 2020 12:48
-
-
Save dan-laskowski/a051cabb92fda11ba12062cad7753f96 to your computer and use it in GitHub Desktop.
[Convert Number to Month Name] #arrays #js #formatting #dates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function monthName(num) { | |
return new Date(2000, num - 1).toLocaleString("en-us", {month: "long"}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment