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 | |||
---|---|---|---|
year | month | day | wday |
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
g | year | month | day |
---|---|---|---|
1 | 1 | 1 |
j | year | month | day |
---|---|---|---|
1 | 1 | 3 |
jdn | day |
---|---|
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 | |||||
---|---|---|---|---|---|
Code | Rule | Pseudo:in | Pseudo:out | Example | Note |
iso | iso8601 | ISO:8601 Date -YYYY | -YYYY-MM-DD | 2023-02-08 | S |
iso_set | iso8601 | ISO:8601 Date -YYYY | [-YYYY-MM-DD] | [2023-02-08] | S |
dmy | text | day month year | dd Mon yyyy | 8 Feb 2023 | D, S |
dmy+ | text | day month year | dd Month yyyy | 8 February 2023 | S |
wdmy | text | wday day month year | Wday dd Mon yyyy | Wed 8 Feb 2023 | |
wdmy+ | text | wday day month year | Weekday dd Month yyyy | Wednesday 8 February 2023 | |
std | text | day month year | ddth Month yyyy | 8th February 2023 | S |
full | text | wday day month year | Weekday ddth Month yyyy | Wednesday 8th February 2023 | |
mdy | text | month day year | Mon dd, yyyy | Feb 8, 2023 | S |
mdy+ | text | month day year | Month dd, yyyy | February 8, 2023 | S |
wmdy | text | wday month day year | Wday, Mon dd, yyyy | Wed, Feb 8, 2023 | |
wmdy+ | text | wday month day year | Weekday, Month dd, yyyy | Wednesday, February 8, 2023 | |
ymd | text | year month day | yyyy:Mon:dd | 2023:Feb:8 | S |
def | text | year month day | yyyy mm dd | 2023 2 8 | H, S |
u | unit | 9y 9m 9d | 9y 9m 9d | 2023y 2m 8d | H |
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.