Glich - v0.3.0 Manual
ay - Astronomical Year
Home Development v0.3.0 Manual Hics Library ay

Calendar Description - Scheme ay

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.

See Wikipedia entry.

Use Case

Definition

The Record consists of four Fields named scheme, year, month and day.

Record - Default Order
schemeyearmonthday
Record - Ranking Order
yearmonthdayscheme
Historic Era
Calendar SchemeStartFinishRange
0Julianpastj# 4 Oct 1582past..2299160
1Gregoriang# 15 Oct 1582future2299161..future

For the range past..2299160 (j# 4 Oct 1582) the Julian Calendar is used. There is zero and negative years. For the range (g# 15 Oct 1582) 2299161..future the Gregorian calendar is used.

The year 1582 has 355 days.

As a Hybrid calendar, it has no single epoch.

Formats

The formats supplied with this scheme.

Formats - Grammar jg
CodeRulePseudoExampleNote
dmytextInput: day month year
Output: dd Mon yyyy
4 Oct 1582
15 Oct 1582
D, S
dmy+textInput: day month year
Output: dd Month yyyy
4 October 1582
15 October 1582
S
mdytextInput: month day year
Output: Mon dd, yyyy
Oct 4, 1582
Oct 15, 1582
S
mdy+textInput: month day year
Output: Month dd, yyyy
October 4, 1582
October 15, 1582
S
dmystextInput: day month year scheme
Output: dd Mon yyyy sch
4 Oct 1582 j
15 Oct 1582 g
dmys+textInput: day month year scheme
Output: dd Month yyyy Scheme
4 October 1582 Julian
15 October 1582 Gregorian
mdystextInput: month day year scheme
Output: Mon dd, yyyy sch
Oct 4, 1582 j
Oct 15, 1582 g
mdys+textInput: month day year scheme
Output: Month dd, yyyy Scheme
October 4, 1582 Julian
October 15, 1582 Gregorian
deftextInput: scheme year month day
Output: s yyyy mm dd
0 1582 10 4
1 1582 10 15
H
uunitInput: 9s 9y 9m 9d
Output: 9s 9y 9m 9d
0s 1582y 10m 4d
1s 1582y 10m 15d
H
Notes: D = Default, H = Hidden, S = Range shortcut supported. Example based on jdn# 2299160 and 2299161

Script

Script - Module hics:ay
lexicon jg { name "Hybrid Julian and Gregorian scheme names"; fieldname scheme; lang en; pseudo Scheme sch; tokens { 0, "Julian", "j"; 1, "Gregorian", "g"; } } grammar jg { name "Hybrid Julian and Gregorian"; fields scheme year month day; rank year month day; lexicons m jg; alias pseudo { dd day; mm month; yyyy year; s scheme; } alias unit { d day; m month; y year; s scheme; } format dmy "{day} |{month:m:a} |{year}"; format "dmy+" "{day} |{month:m} |{year}"; format mdy "{month:m:a} |{day}, |{year}"; format "mdy+" "{month:m} |{day}, |{year}"; format dmys "{day} |{month:m:a} |{year} |{scheme:jg:a}"; format "dmys+" "{day} |{month:m} |{year} |{scheme:jg}"; format mdys "{month:m:a} |{day}, |{year} |{scheme:jg:a}"; format "mdys+" "{month:m} |{day}, |{year} |{scheme:jg}"; preferred dmy; } scheme ay { name "Astronomical Year"; base hybrid { fields scheme year month day; scheme 0 { base julian; } change 2299161; // g# 15 Oct 1582 scheme 1 { base gregorian; } } grammar jg; }

The script uses the lexicon "m" definition from the j Julian scheme.

Home Development v0.3.0 Manual Hics Library ay

Managed by WebPageLayout Validated by HTML Validator (based on Tidy)

27th July 2023