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
| Scheme Names | ||||
|---|---|---|---|---|
| Calendar | Start | Finish | Notes | |
| j | Julian | past | j# 4 Oct 1582 | |
| g | Gregorian | g# 15 Oct 1582 | future | Year 1582 is 355 days long | 
| Record | |||||
|---|---|---|---|---|---|
| scheme | year | month | day | wday | |
 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 | 
|---|
| vocab jg { name "Scheme names"; fieldname scheme; lang en; stylename Scheme, Sch; tokens { 0, "Julian", "j"; 1, "Gregorian", "g"; } } grammar jg { inherit j; vocabs jg; alias field { Scheme, scheme; } alias stylename { Scheme, s; } 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" vocab to use with the scheme field.
 The script makes use of the globally available read-only field wday
 to output weekdays.