Open majumeke opened 6 years ago
That is a good idea.
Unless only the current year is supported, full date support is necessary and automatic calendar recognition is not practical.
I think that support for multiple calendars should be added to the date() function, for conversion to Gregorian calendar, as a conversion option for (Gregorian) dates in the result, and as a conversion dialog in the GUI.
It should not be difficult to achieve for most common calendars, but I will need to do some research since I'm not at all familiar with non-Gregorian calendars. It would be helpful if you could point me in the direction of good conversion formulas.
excellent, i appreciate your willingness to add this to Qalculate!
onto the formulas:
i've found this page with date conversion done in javascript with a downloadable package for offline use:
a user has posted an updated package with refinements here on GitHub here:
secondly i stumbled upon the book Calendrical Calculations by Nachum Dershowitz and Edward M. Reingold:
the book ships with an application known as Calendrica that is used for date conversions and the authors have kindly supplied its source code on the books website:
it is written in LISP but a user has created a python library for version 3 of Calendrica here on GitHub:
and another user has ported it to Erlang:
the app itself can be accessed as a Java applet on this page:
http://www.cs.tau.ac.il/~nachum/calendar-book/Calendrica.html
also there's an excellent freeware program called Calendar Magic its Calendar Comparison/Conversion feature has been implemented really well. perhaps you could model Qalculate's GUI after it
I've finished calendar conversion for an initial set of calendars.
wow, this looks really good Thank you. can't wait to see more calendars added.
looking good in 2.6. i especially like how you've handled the complex Chinese calendar and how the different calendars have their native month names. please keep it up and i hope to see more calendars added like the Bengali calendar, Buddhist calendar, etc. but for now this can be considered closed.
Thank you.
this can be considered closed.
Issue can be closed by issue creator or repo owner.
since there are numerous calendars in the world:
would you consider adding a conversion function to Qalculate! so that we can be able to convert between these various calendars ? it would be nice if it could be implemented by entering the year to be converted into the expression entry box(2018 gregorian to coptic) or through a dialog box where a user can enter a year in one calendar and have it displayed in the various other calendars, an example:
user enters 2968 which Qalculate! will recognize as the current Berber year and return:
2018 <== Gregorian calendar 2562 <== Buddhist calendar 1734 <== Coptic calendar 5778 <== Hebrew calendar 1396 <== Iranian calendar 4351 <== Korean calendar etc(ideally all current calendars would be returned)
a bonus feature would be the ability to convert dates. an example would be to convert the Islamic date today: 7th, Ramadan(9th month), 1439 into the Hebrew calendar which would be 8th, Sivan(9th month), 5778.
Thank you.