Glich - v0.3.0 Manual
g - Gregorian
Home Development v0.3.0 Manual Hics Library g

Calendar Description - Scheme g

This Gregorian calendar implements the changes made to the Julian calendar by Pope Gregory XIII. There were three changes made, a change to the way leap years are determined, the year number change date (New Year) fixed to 1st January, and the removal of excess days (compared to the solar year) that had built up since AD 325 (the year the First Council of Nicaea was held).

The proleptic Gregorian calendar follows the ISO 8601 standard. The year zero is included, years before year zero are given as negative.

Use Case

The Gregorian calendar was first introduced in Catholic countries in 1582 and has since be adopted by most of the world and has become the most commonly used calendar today.

The Gregorian calendar is set as the default calendar scheme in the Hics library.

Definition

The Gregorian calendar is based on a solar year of 365.2425 days. Days start at midnight.

The Record consists of three Fields named year, month and day and the extended Field named wday.

Record
yearmonthdaywday

There are two types of years, a common year and a leap year. Years are leap years when the current era year is divisible by 4 but not by 100 unless divisible by 400.

The Epoch is set at

gyearmonthday
111
=
jyearmonthday
113
=
jdnday
1721426
.

In all other respects, the calendar is the same as the Julian calendar.

Formats

The formats supplies the same formats as the j Julian scheme with the addition of two ISO 8601 formats.

Details of the the ISO 8601 standard format is shown in the format statement rules iso8601 section with examples to show how to extend the available formats.

Formats - Grammar g
CodeRulePseudo:inPseudo:outExampleNote
isoiso8601ISO:8601 Date -YYYY-YYYY-MM-DD2023-02-08S
iso_setiso8601ISO:8601 Date -YYYY[-YYYY-MM-DD][2023-02-08]S
dmytextday month yeardd Mon yyyy8 Feb 2023D, S
dmy+textday month yeardd Month yyyy8 February 2023S
wdmytextwday day month yearWday dd Mon yyyyWed 8 Feb 2023
wdmy+textwday day month yearWeekday dd Month yyyyWednesday 8 February 2023
stdtextday month yearddth Month yyyy8th February 2023S
fulltextwday day month yearWeekday ddth Month yyyyWednesday 8th February 2023
mdytextmonth day yearMon dd, yyyyFeb 8, 2023S
mdy+textmonth day yearMonth dd, yyyyFebruary 8, 2023S
wmdytextwday month day yearWday, Mon dd, yyyyWed, Feb 8, 2023
wmdy+textwday month day yearWeekday, Month dd, yyyyWednesday, February 8, 2023
ymdtextyear month dayyyyy:Mon:dd2023:Feb:8S
deftextyear month dayyyyy mm dd2023 2 8H, S
uunit9y 9m 9d9y 9m 9d2023y 2m 8dH
Notes: D = Default, H = Hidden, S = Range shortcut supported. Example based on jdn# 2459984

Script

Script - Module hics:gregorian
grammar g { name "Gregorian"; inherit j; format iso { rules iso8601 minus; } format iso_set { rules iso8601 dateset minus; } preferred dmy; } scheme g { name "Gregorian"; base gregorian; grammar g; }

The grammar "g" inherits from the grammar "j" definition from j Julian.

This scheme is set as the system default in the hics:hic_lib module.

Home Development v0.3.0 Manual Hics Library g

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

19th July 2023