Glich - v0.3.0 Manual
jwn - Julian Week Number
Home Development v0.3.0 Manual Hics Library jwn

Calendar Description - Scheme jwn

The Julian Week Number is a count of weeks, just as the Julian Day Number is a count of days. It is based on the first day of the week being a Monday.

The seven day week is thought to have originated in ancient Babylonia around 600 BCE. The day of the week is used with the Julian, Gregorian, Hebrew, Islamic and other calendars.

There are more than one way of numbering the week days. If the scheme only uses text names for the week days, any numbering system can be used since the numbers are not normally visible. However, some calendars put significance on the first day of the week or routinely use the weekday number (i.e. ISO, Hebrew and Islamic calendars) and so the numbering system can be selected depending on how the scheme is specified.

This scheme is based on the week starting on a Monday, i.e. day 1 = Monday. It is commonly used with the Julian, Gregorian calendars and variants. They use the optional field wday.

Because this calendar scheme has limited historical value, its visibility is set at hidden.

Use Case

It is commonly used with the Julian and Gregorian calendars and variants. They use the optional field wday.

The week field number has some value when considering week differences and ranges. It can also be used with modular arithmetic to create regular weekly intervals.

Definition

Week Names - Lexicon w
NumberName
FullAbrev.
1MondayMon
2TuesdayTue
3WednesdayWed
4ThursdayThur
5FridayFri
6SaturdaySat
7SundaySun

The day start is not defined and will depend on context.

The Record consists of two Fields named week and day.

Record
weekday

The calendar is a repeating cycle of 7 days, starting with the first Monday. The weeks are counted from the same era as the jdn scheme.

The Epoch is set at
jwnweekday
11
=
jdnday
7
a Monday.

Formats

The formats supplied with this scheme.

Formats - Grammar jwn
CodeRulePseudo:inPseudo:outExampleNote
wdtextweek daywwwww d351518 6S
wdaytextweek daywwwww Wday351518 SatD, S
wday+textweek daywwwww Weekday351518 SaturdayS
deftextweek daywwwww d351518 6H, S
uunit9w 9d9w 9d351518w 6dH
Notes: D = Default, H = Hidden, S = Range shortcut supported. Example based on jdn# 2460631

Script

Script - Module hics:week
lexicon w { name "Weekday names Monday start"; fieldname wday; lang en; pseudo Weekday, Wday; tokens { 1, "Monday", "Mon"; 2, "Tuesday", "Tue"; 3, "Wednesday", "Wed"; 4, "Thursday", "Thur"; 5, "Friday", "Fri"; 6, "Saturday", "Sat"; 7, "Sunday", "Sun"; } } grammar jwn { name "Julian Week Number (Monday)"; fields week day; lexicons w; alias lexicon { wday day; } alias pseudo { wwwww week; d day; } alias unit { d day; w week; } format wd "{week}| {day}"; format wday "{week}| {day:w:a}"; format "wday+", "{week}| {day:w}"; preferred wday; } scheme jwn { name "Julian Week Number"; base jwn; grammar jwn; visible no; }

The script has no dependencies.

Home Development v0.3.0 Manual Hics Library jwn

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

19th July 2023