you-dont-need / You-Dont-Need-Momentjs

List of functions which you can use to replace moment.js + ESLint Plugin
MIT License
13.28k stars 319 forks source link

Worth discussing non-Gregorian calendar support in Moment alternatives #126

Open bcullman opened 2 years ago

bcullman commented 2 years ago

non-Gregorian calendars (Hebrew, Islamic, Solar, Japanese and a few others) are one of the reasons in the past my teams had to stick with Moment.

It would be interesting to have a table or column in existing table on the state of non-Gregorian support in Moment alternatives

aliakbarazizi commented 2 years ago

Yes, I actually stuck in calculating a number of days in month in persian calendar.

aliakbarazizi commented 2 years ago

After some search I found out there is no good alternative way if you want to convert calendar. The best library for this right now is moment.

For native support there is a proposal https://github.com/tc39/proposal-temporal but its not final yet.

There is a polyfill for that as well but still under development.

bcullman commented 2 years ago

@aliazizi - fee free to open a PR that adds a column to the existing readme.md table.