How to Implement Ethiopian Calendar with 13months React-Day-Picker? #2654
Replies: 4 comments 6 replies
-
@temesgen-mulugeta thanks for your idea. I'd love to implement the Ethiopian calendar in DayPicker. I recently could add the Persian calendar, which stores the dates in Gregorian, so I believe it should be possible with Ethiopian too. Check out how the Persian calendar works: The Persian calendar uses the ...more specifically, we need to implement a custom DateLib for Ethiopian calendar, and understand which changes are required to the date-fns locales. I was wondering if your expertise could help us out. I could start by building a proof of concept to get us going. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
It took an entire afternoon to debug this issue, and it turned out to be caused by an innocent-looking addDays function. My IDE had auto-generated an unimplementation inside dateutils. Since I was already using dateutils in multiple projects, I assumed there wouldn’t be any issues there. I’ve fixed the bug now and added overrides for other key functions, like week counts. I’ll be testing everything thoroughly, and once that’s done, I’d be happy to request a PR if you’d like this to be part of the examples list. @gpbl @rodgobbi Thank you so much for your help and for creating such an amazing project! |
Beta Was this translation helpful? Give feedback.
-
Thanks @temesgen-mulugeta and @rodgobbi for your help working on this project. I love Ethiopian culture (and food) and I'm happy to work for a more inclusive DayPicker. @temesgen-mulugeta, I had a chance to look at your great work for MUI: we need to abstract the work done there into some code that is compatible with the In my opinion, it is not worth it yet to publish a For this reason, I've opened a PR to use as a starting point: Please let's move the discussion about the implementation of the Ethiopic calendar there. Thanks again! |
Beta Was this translation helpful? Give feedback.
-
I want to use react-day-picker to create an Ethiopian calendar. The Ethiopian calendar differs from the Gregorian calendar in that:
It’s 7–8 years behind.
It has 13 months (12 months of 30 days, plus a 13th month of 5 or 6 days).
New Year’s Day falls on September 11 or 12 (Gregorian).
My goal is to render Ethiopian dates in the UI but store and work with Gregorian dates internally.
One solution I’m considering is rewriting the month component to render my custom components. I’ve done something similar with MUI Date Picker and even have a package for it, but I’m wondering if there’s a better solution with react-day-picker.
Any guidance or suggestions would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions