Mal:ISOWEEKDAY

Fra Whiskywiki
Hopp til: navigasjon, søk


{{subst:ISOWEEKDAY|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:

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.


Eksempler

  • {{ISOWEEKDAY|2005|12|31}} gir 6, og er ekvivalent med {{ISOWEEKDAY|2006|1|0}} gir 6
  • {{ISOWEEKDAY|2006|1|1}} gir 7
  • {{ISOWEEKDAY|2006|1|2}} gir 1

Eksempel der ISO-året går tre dager inn i det neste gregorianske året

  • {{ISOWEEKDAY|2009|12|31}} gir 4
  • {{ISOWEEKDAY|2010|1|1}} gir 5
  • {{ISOWEEKDAY|2010|1|2}} gir 6
  • {{ISOWEEKDAY|2010|1|3}} gir 7
  • {{ISOWEEKDAY|2010|1|4}} gir 1

Eksempel der ISO-året går tre dager inn i det foregående gregorianske året

  • {{ISOWEEKDAY|2008|12|28}} gir 7
  • {{ISOWEEKDAY|2008|12|29}} gir 1
  • {{ISOWEEKDAY|2008|12|30}} gir 2
  • {{ISOWEEKDAY|2008|12|31}} gir 3
  • {{ISOWEEKDAY|2009|1|1}} gir 4
  • {{CURRENTDOW}} gives 0
  • integer MJD of Thursday of the week: 59347
  • isoyear: 2021
  • integer MJD of Thursday of the week of 1 Jan of the same year: 59214
  • week number:

Sunday


Se også