This is not always possible. Pre-requisite is that the definition of day,
lunar cycle, solar cycle etc. are aligned and conversions are reversible.
The astronomical calendar is, more or less, solar based.
The Hebrew, Buddist. Chinese, Hellenic etc. calendars are all lunisolar. The
Islamic (Hijri) is purely lunar.
A date/time from a lunisolar or lunar date stored according to an
astronomical calendar and standard time is not always non-ambiguous.
Hebrew and Islamic dates start, for example, at "sunset". Two Muslim cities
may start their months on different days depending upon their sightings.
Differences of 1 or even 2 days are not rare.
The Hebrew calendar is even more "complex" since its based on rules and
local conventions and not directly upon local observations. Not only can two
cities in the same time zone can have quite different standard times on a
given calendar day for the start and end of the day but two people standing
the same room might have day starts differing by minutes from one another.
On Fri, 16 Sep 2011 16:26:29 -0400, Ray Denenberg wrote
> From: [UTF-8?]SaaÅ¡ha Metsärantala
> > > dateAndCalendar = date "^" calendar
> > I assume that we mean that the "date" (that is the part of
> > dateAndCalendar before the caret) actually IS stored according to the
> > astronomical (nearly
> > gregorian) "calendar", but is expected to be CONVERTED (according to
> > the algorithm of the "calendar" following the caret) before it is
> > displayed to the end user.
> Yes that is probably the only reasonable interpretation. I'll add a note
to that effect.
Edward C. Zimmermann, NONMONOTONIC LAB