metomi/isodatetime

Allow temporary switching to a different calendar

benfitzpatrick opened this issue · 2 comments

Sometimes it can be useful to compute proleptic Gregorian calculations (e.g. getting unix time from a wallclock time string) at the same time as running within another calendar. It would be nice to be able to temporarily override the calendar setting.

I think we need to re-consider the data model. E.g. all time point objects and duration objects that involve months and years should have a calendar property set. The should then allow us to avoid having a singleton calendar that is so problematic.

Note to self: This is not about converting e.g. 360day calendar to Gregorian (which isn't possible as there's no canonical 360day calendar)