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 | ||
---|---|---|
Number | Name | |
Full | Abrev. | |
1 | Monday | Mon |
2 | Tuesday | Tue |
3 | Wednesday | Wed |
4 | Thursday | Thur |
5 | Friday | Fri |
6 | Saturday | Sat |
7 | Sunday | Sun |
The day start is not defined and will depend on context.
The Record consists of two Fields named week
and day.
Record | |
---|---|
week | day |
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.
jwn | week | day |
---|---|---|
1 | 1 |
jdn | day |
---|---|
7 |
Formats
The formats supplied with this scheme.
Formats - Grammar jwn | |||||
---|---|---|---|---|---|
Code | Rule | Pseudo:in | Pseudo:out | Example | Note |
wd | text | week day | wwwww d | 351518 6 | S |
wday | text | week day | wwwww Wday | 351518 Sat | D, S |
wday+ | text | week day | wwwww Weekday | 351518 Saturday | S |
def | text | week day | wwwww d | 351518 6 | H, S |
u | unit | 9w 9d | 9w 9d | 351518w 6d | H |
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.