HistoryCal - V0.0.7 Manual
isow# ISO Week
Home Development V0.0.7 Manual Cal. Definitions isow

Calendar Description

The ISO Week calendar scheme is a system of numbering the weeks of the year and is based on the Gregorian calendar. A week is defined as Monday being day 1 through to Sunday day 7. The first week of the year is defined as the week containing the first Thursday of the Gregorian year. The ISO Week year thus has 52 or 53 weeks (364 or 371 days). The ISO Week year does not quite match the Gregorian year, with the year change occurring on the 29th, 30th or 31st of December, or the 1st, 2nd, 3rd or 4th of January - whichever day Monday falls.

Use Case

Details of the scheme were published in 1976 by the International Standards Organisation in their ISO 2015:1976 document. This was superseded in 2004 by the ISO 8601:2004 and later publications.

Definition

Record
yearweekwday

The ISO Week calendar is defined in terms of the Gregorian calendar. The week is as defined for the wday field in the Seven Day Week page. The first week of the year is defined as the week containing the first Thursday of the Gregorian year.

The Record consists of three Fields named year, week, and wday.

The Epoch is set at
isowyearweekwday
111
=
gyearmonthday
111
=
jdnday
1721426
.

Script

Default Script
grammar isow { lexicons w; alias field { Day, wday; Week, week; Year, year; } alias pseudo { d, Day; ww, Week; yyyy, Year; } alias unit { d, day; y, year; w, week; } format ywd { rules iso8601 week; } format hc_ywd, "(Year)| (Week)| (Day:w:a)"; format "hc_ywd+", "(Year)| (Week)| (Day:w)"; format hc_iso, "(Year)| (Week)| (Day)"; pref ywd; } scheme isow { name "ISO:8601 Standard Week"; base isoweek; grammar isow; }
example/iso5.hcs Script
format isow:y5wd { rules iso8601 week year5; }
example/iso6.hcs Script
format isow:y6wd { rules iso8601 week year6; }
Home Development V0.0.7 Manual Cal. Definitions isow

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

28th April 2016