Glich - v0.3.0 Manual
go - Gregorian Ordinal
Home Development v0.3.0 Manual Hics Library go

Calendar Description - Scheme go

The Ordinal calendar is defined in terms of the Gregorian calendar. It consists of a count of years and days. It is also (confusingly) known as the Julian Date and the day number as the Julian Day but these terms are not recommended.

The year is identical to the Gregorian year. The day is the ordinal number of days since 1st of January in that year. The number of days in a year is 365 or 366, the same as the equivalent Gregorian year.

Use Case

Often used by modern day industry, where it may be referred to as Julian date.

Details of the scheme where published in 1973 by the International Standards Organisation in their ISO 2711:1973 document. This was superseded in 2004 by the ISO 8601:2004 and later publications.

Definition

The Ordinal calendar is defined in terms of the Gregorian calendar.

The Record consists of two Fields named year and day.

Record
yearday

The year length and number are the same as the g Gregorian calendar scheme. Day one is defined as 1st January.

The Epoch is set at

goyearday
11
=
gyearmonthday
111
=
jdnday
1721426
.

Formats

The formats supplied with this scheme.

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 go
CodeRulePseudo:inPseudo:outExampleNote
ydtextyear dayyyyy ddd2023 39D, S
isoiso8601ISO:8601 Ordinal -YYYY-YYYY-DDD2023-039S
deftextyear dayyyyy ddd2023 39H, S
uunit9y 9d9y 9d2023y 39dH
Notes: D = Default, H = Hidden, S = Range shortcut supported. Example based on jdn# 2459984

Script

Script - Module hics:gregorian
grammar go { name "Year Day"; fields year day; alias pseudo { ddd day; yyyy year; } alias unit { d day; y year; } format yd "{year}| {day}"; format iso { rules iso8601 ordinal minus; } preferred yd; } scheme go { name "Gregorian Ordinal"; base ordinal; grammar go; }

The script has no dependencies.

Home Development v0.3.0 Manual Hics Library go

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

19th July 2023