Template:ISOYEAR
Jump to navigation
Jump to search
[edit] [ ] Template documentation
The ISOYEAR template computes the number of the ISO year for the date of the Gregorian calendar (or proleptic) in parameter. Any ISO year always includes an integer number, 52 or 53, of ISO weeks, each one starting on Monday and ending on Sunday. The ISO year:
- starts at 0:00 of the Monday between 29 December of the previous Gregorian year and 4 January of the same Gregorian year (which is the Monday before the first Thursday of the same Gregorian year, and the Monday which is nearest in time to 1 January);
- finishes at 24:00 of the Sunday between 28 December of the same Gregorian year and 3 January of the next Gregorian year (which is the Sunday after the last Thursday of the same Gregorian year, and the Sunday which is nearest in time to 31 December).
Thus the first and last Thursday of the ISO year are also the first and last Thursday in the same Gregorian year.
The number of the ISO year always equals the number og the Gregorian (or proleptic) year for dates between 4 January and 28 December, and for every Thursday.
Syntax:
- {{ISOYEAR|year|month|day}}
- The year must be astronomical (année=1 en 1 ap. J.-C. (Anno Domini), année=0 en 1 av. J.-C., année=-1 en 2 av. J.-C.).
- The month is between 1 and 12 from January to December.
- The day is normally between 1 and 31 (but offsets are possible to compute other dates).
Examples
"{{ISOYEAR|2005|12|31}}"
gives "2005" [1], and is eqv. with"{{ISOYEAR|2006|1|0}}"
gives "2005" [2]"{{ISOYEAR|2006|1|1}}"
gives "2005" [3]"{{ISOYEAR|2006|1|2}}"
gives "2006" [4]
Examples where the ISO year is three days into the next gregorian year
"{{ISOYEAR|2009|12|31}}"
gives "2009" [5]"{{ISOYEAR|2010|1|1}}"
gives "2009" [6]"{{ISOYEAR|2010|1|2}}"
gives "2009" [7]"{{ISOYEAR|2010|1|3}}"
gives "2009" [8]"{{ISOYEAR|2010|1|4}}"
gives "2010" [9]
Examples where the ISO year is three days into the previous gregorian year
"{{ISOYEAR|2008|12|28}}"
gives "2008" [10]"{{ISOYEAR|2008|12|29}}"
gives "2009" [11]"{{ISOYEAR|2008|12|30}}"
gives "2009" [12]"{{ISOYEAR|2008|12|31}}"
gives "2009" [13]"{{ISOYEAR|2009|1|1}}"
gives "2009" [14]
More Examples:
- {{ISOYEAR|1999|12|28}} returns 1999
- {{ISOYEAR|1999|12|29}} returns 1999
- {{ISOYEAR|1999|12|30}} returns 1999
- {{ISOYEAR|1999|12|31}} returns 1999
- {{ISOYEAR|2000|1|1}} returns 1999
- {{ISOYEAR|2000|1|2}} returns 1999
- {{ISOYEAR|2000|1|3}} returns 2000
- {{ISOYEAR|2000|1|4}} returns 2000
- {{ISOYEAR|2000|12|28}} returns 2000
- {{ISOYEAR|2000|12|29}} returns 2000
- {{ISOYEAR|2000|12|30}} returns 2000
- {{ISOYEAR|2000|12|31}} returns 2000
- {{ISOYEAR|2001|1|1}} returns 2001
- {{ISOYEAR|2001|1|2}} returns 2001
- {{ISOYEAR|2001|1|3}} returns 2001
- {{ISOYEAR|2001|1|4}} returns 2001
- {{ISOYEAR|2001|12|28}} returns 2001
- {{ISOYEAR|2001|12|29}} returns 2001
- {{ISOYEAR|2001|12|30}} returns 2001
- {{ISOYEAR|2001|12|31}} returns 2002
- {{ISOYEAR|2002|1|1}} returns 2002
- {{ISOYEAR|2002|1|2}} returns 2002
- {{ISOYEAR|2002|1|3}} returns 2002
- {{ISOYEAR|2002|1|4}} returns 2002
- {{ISOYEAR|2002|12|28}} returns 2002
- {{ISOYEAR|2002|12|29}} returns 2002
- {{ISOYEAR|2002|12|30}} returns 2003
- {{ISOYEAR|2002|12|31}} returns 2003
- {{ISOYEAR|2003|1|1}} returns 2003
- {{ISOYEAR|2003|1|2}} returns 2003
- {{ISOYEAR|2003|1|3}} returns 2003
- {{ISOYEAR|2003|1|4}} returns 2003
- {{ISOYEAR|2003|12|28}} returns 2003
- {{ISOYEAR|2003|12|29}} returns 2004
- {{ISOYEAR|2003|12|30}} returns 2004
- {{ISOYEAR|2003|12|31}} returns 2004
- {{ISOYEAR|2004|1|1}} returns 2004
- {{ISOYEAR|2004|1|2}} returns 2004
- {{ISOYEAR|2004|1|3}} returns 2004
- {{ISOYEAR|2004|1|4}} returns 2004
- {{ISOYEAR|2004|12|28}} returns 2004
- {{ISOYEAR|2004|12|29}} returns 2004
- {{ISOYEAR|2004|12|30}} returns 2004
- {{ISOYEAR|2004|12|31}} returns 2004
- {{ISOYEAR|2005|1|1}} returns 2004
- {{ISOYEAR|2005|1|2}} returns 2004
- {{ISOYEAR|2005|1|3}} returns 2005
- {{ISOYEAR|2005|1|4}} returns 2005
- {{ISOYEAR|2005|12|28}} returns 2005
- {{ISOYEAR|2005|12|29}} returns 2005
- {{ISOYEAR|2005|12|30}} returns 2005
- {{ISOYEAR|2005|12|31}} returns 2005
- {{ISOYEAR|2006|1|1}} returns 2005
- {{ISOYEAR|2006|1|2}} returns 2006
- {{ISOYEAR|2006|1|3}} returns 2006
- {{ISOYEAR|2006|1|4}} returns 2006
- {{ISOYEAR|2006|12|28}} returns 2006
- {{ISOYEAR|2006|12|29}} returns 2006
- {{ISOYEAR|2006|12|30}} returns 2006
- {{ISOYEAR|2006|12|31}} returns 2006
- {{ISOYEAR|2007|1|1}} returns 2007
- {{ISOYEAR|2007|1|2}} returns 2007
- {{ISOYEAR|2007|1|3}} returns 2007
- {{ISOYEAR|2007|12|30}} returns 2007
- {{ISOYEAR|2007|12|31}} returns 2008
- See also:
- Template:YEARCC
- Template:YEARYY
- Template:CENTURY
- Template:ISLEAPYEAR
- Template:MONTHDAYS
- Template:JULIANDAY
- Template:WEEKDAY
- Template:CURRENTISOYEAR
- Template:ISOWEEKDATE -
"{{ISOWEEKDATE|2010|01|03}}"
gives "2009-W53-7" [15] The opposite function of {{ISOWEEKDATE2YMD}}
- Template:ISOYEAR -
"{{ISOYEAR|2010|01|03}}"
gives "2009" [16] - Template:ISOWEEK -
"{{ISOWEEK|2010|01|03}}"
gives "53" [17] - Template:ISOWEEKDAY -
"{{ISOWEEKDAY|2010|01|03}}"
gives "7" [18]
- Template:ISOYEAR -
- Template:ISOWEEKDATE2YMD -
"{{ISOWEEKDATE2YMD|2009|53|7}}"
gives "2010-01-03 " [19] The opposite function of {{ISOWEEKDATE}}
- Template:ISOWEEKDATE2Y -
"{{ISOWEEKDATE2Y|2009|53|7}}"
gives "2010" [20] - Template:ISOWEEKDATE2M -
"{{ISOWEEKDATE2M|2009|53|7}}"
gives "01" [21] - Template:ISOWEEKDATE2D -
"{{ISOWEEKDATE2D|2009|53|7}}"
gives "03 " [22]
- Template:ISOWEEKDATE2Y -
fr:Modèle:ISOYEAR hsb:Předłoha:ISOYEAR ko:틀:ISO 연 no:Mal:ISOYEAR ru:Шаблон:ISOYEAR stq:Foarloage:ISOYEAR
The above documentation is transcluded from Template:ISOYEAR/doc. (edit | history) Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |