We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We tried in our project to localize the calendar. It is possible to localize the names of months and weekdays just by knowing the locale.
return { name: "gregorian_en", digits: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], months: Array.from({ length: 12 }, (_, i) => { const month = new DateObject({ year: 2001, month: i + 1, day: 1 }); return [ new Intl.DateTimeFormat(locale, { month: "long" }).format(month.toDate()), new Intl.DateTimeFormat(locale, { month: "short" }).format(month.toDate()) ]; }), weekDays: Array.from({ length: 7 }, (_, i) => { const day = new DateObject({ year: 2001, month: 2, day: i + 3 }); return [ new Intl.DateTimeFormat(locale, { weekday: "long" }).format(day.toDate()), new Intl.DateTimeFormat(locale, { weekday: "short" }).format(day.toDate()) ]; }), meridiems: [ ["AM", "am"], ["PM", "pm"], ], };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We tried in our project to localize the calendar. It is possible to localize the names of months and weekdays just by knowing the locale.
The text was updated successfully, but these errors were encountered: