Template:ISOWEEKDAY
From Wikipedia, the free encyclopedia
{{subst:DOW|2006|1|3|subst=subst:}} gives the wikitext 2.
This template computes the ISO weekday number (1=Monday, 7=Sunday) for a given Gregorian date.
Alternative weekday number systems are:
- 1=Monday, .. , 6=Saturday, 0=Sunday, used by variable {{CURRENTDOW}}
- 0=Monday, .. , 5=Saturday, 6=Sunday, used by en:Template:WEEKDAY and
Syntax:
- {{DOW|year|month|day}}
- The year must be astronomical (year=1 in 1 AD (Anno Domini), year=0 in 1 BC, year=-1 in 2 BC).
- The month is between 1 and 12 from january to december.
- The day is normally between 1 and 31.
Contents |
[edit] Examples
- {{
ISOWEEKDAY|2005|12|31
}} gives 6, and is eqv. with {{ISOWEEKDAY|2006|1|0
}} gives 6 - {{
ISOWEEKDAY|2006|1|1
}} gives 7 - {{
ISOWEEKDAY|2006|1|2
}} gives 1
[edit] Examples where the ISO year is three days into the next gregorian year
- {{
ISOWEEKDAY|2009|12|31
}} gives 4 - {{
ISOWEEKDAY|2010|1|1
}} gives 5 - {{
ISOWEEKDAY|2010|1|2
}} gives 6 - {{
ISOWEEKDAY|2010|1|3
}} gives 7 - {{
ISOWEEKDAY|2010|1|4
}} gives 1
[edit] Examples where the ISO year is three days into the previous gregorian year
- {{
ISOWEEKDAY|2008|12|28
}} gives 7 - {{
ISOWEEKDAY|2008|12|29
}} gives 1 - {{
ISOWEEKDAY|2008|12|30
}} gives 2 - {{
ISOWEEKDAY|2008|12|31
}} gives 3 - {{
ISOWEEKDAY|2009|1|1
}} gives 4
- {{CURRENTDOW}} gives 6
- integer MJD of Thursday of the week: Expression error: Unrecognised punctuation character "["
- isoyear: Template:MJD2Y
- integer MJD of Thursday of the week of 1 Jan of the same year: Expression error: Unrecognised punctuation character "["
- week number: Template:Week
Template:DOW name
[edit] See also
- Template based upon MediaWiki:Template:DOW
- Template:ISOYEAR
- Template:ISOWEEK
- Template:ISOWEEKDATE