Calendar Description - Scheme jwsn
The Julian Week (Sunday) Number is a count of weeks, a variation of the Julian Week Number scheme.
This scheme is based on the week starting on a Sunday, i.e. day 1 = Sunday.
Because this calendar scheme has limited historical value, its visibility is set at hidden.
Use Case
It is commonly used with the The Hebrew, Islamic calendars and variants.
They use the optional field wsday
.
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 ws | ||
---|---|---|
Number | Name | |
Full | Abrev. | |
1 | Sunday | Sun |
2 | Monday | Mon |
3 | Tuesday | Tue |
4 | Wednesday | Wed |
5 | Thursday | Thur |
6 | Friday | Fri |
7 | Saturday | Sat |
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 Sunday. The weeks are counted from the same era as the jdn scheme.
jwsn | week | day |
---|---|---|
1 | 1 |
jdn | day |
---|---|
6 |
Formats
The formats supplied with this scheme.
Formats - Grammar jwsn | |||||
---|---|---|---|---|---|
Code | Rule | Pseudo:in | Pseudo:out | Example | Note |
wd | text | week day | wwwww d | 351518 7 | 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 7 | H, S |
u | unit | 9w 9d | 9w 9d | 351518w 7d | H |
Notes: D = Default, H = Hidden, S = Range shortcut supported. Example based on jdn# 2460631 |
Script
Script - Module hics:week |
---|
lexicon ws { name "Weekday names Sunday start"; fieldname wsday; lang en; pseudo Weekday, Wday; tokens { 1, "Sunday", "Sun"; 2, "Monday", "Mon"; 3, "Tuesday", "Tue"; 4, "Wednesday", "Wed"; 5, "Thursday", "Thur"; 6, "Friday", "Fri"; 7, "Saturday", "Sat"; } } grammar jwsn { name "Julian Week Number (Sunday)"; fields week day; lexicons ws; alias lexicon { wsday day; } alias pseudo { wwwww week; d day; } alias unit { d day; w week; } format wd "{week}| {day}"; format wday "{week}| {day:ws:a}"; format "wday+", "{week}| {day:ws}"; preferred wday; } scheme jwsn { name "Julian Week (Sunday) Number"; base jwn sunday; grammar jwsn; visible no; } |
The script has no dependencies.