is there a way to get month names from month number? #3187
Unanswered
bryanltobing
asked this question in
Q&A
Replies: 1 comment
-
You can use the import { enUS } from "date-fns/locale";
console.log(enUS.localize.month(0, { width: "narrow" })); // J
console.log(enUS.localize.month(0, { width: "abbreviated" })); // Jan
console.log(enUS.localize.month(0, { width: "wide" })); // January
// en-US defaults to a width of 'wide'
console.log(enUS.localize.month(0)); // January |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Beta Was this translation helpful? Give feedback.
All reactions