Calendar Description
The Astronomical Year calendar is a hybrid variant combining the Julian and the Gregorian calendars. The calendar contains the year zero and prior years are shown as negative.
Use Case
- This calendar is commonly used by astronomers. See Wikipedia entry.
Definition
Record | |||||
---|---|---|---|---|---|
scheme | year | month | day | wday |
Historic Era | ||||
---|---|---|---|---|
Calendar | Start | Finish | Notes | |
j | Julian | past | j# 4 Oct 1582 | |
g | Gregorian | g# 15 Oct 1582 | future | Year 1582 is 355 days long |
The Record consists of four Fields named year,
month,
day
and scheme
plus the read only Field wday.
As a Hybrid calendar, it has no single epoch.
Script
Default Script |
---|
lexicon jg { name "Scheme names"; fieldname scheme; lang en; pseudo Scheme, Sch; tokens { 0, "Julian", "j"; 1, "Gregorian", "g"; } } grammar jg { inherit j; lexicons jg; alias field { Scheme, scheme; } alias pseudo { s, Scheme; } format dmys, "(Day) |(Month:m:a) |(Year) |(Scheme:jg:a)"; format "dmys+", "(Day) |(Month:m) |(Year) |(Scheme:jg)"; pref dmy; } scheme ay { name "Astronomical Year"; hybrid { fields year, month, day; scheme j; change 2299161; // g# 15 Oct 1582 scheme g; } grammar jg; } |
The "jg" grammar inherits the "j" grammar
and adds "jg" lexicon to use with the scheme
field.
The script makes use of the globally available read-only field wday
to output weekdays.