.

Template:CURRENTISOYEAR/doc

Wikicars, a place to share your automotive knowledge
Jump to: navigation, search
Edit-copy green.png This is a documentation subpage for CURRENTISOYEAR/doc (see that page for the template or article itself).
It contains usage information, categories, interlanguage links and other content that is not part of the original page.


This templates returns the ISO year number for today (as set by UTC time on the Wikipedia server).

The ISO year (always equal to the gregorian year between January the 4th, in ISO week 1, and December the 28th) always includes an integer number, 52 or 53, of ISO weeks starting each on Monday and ending on Sunday; the ISO year may be smaller (by 1) on the first zero to three days of January, and may be larger (by 1) on the last zero to three days of December.

Usage

{{CURRENTISOYEAR{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||etc.}}}} gives {{#if:17|{{#if:10|{{#if:2017|{{#switch:10|1={{#ifexpr:17<4-{{#if:4|{{#if:1|{{#if:2017|{{#expr:{{#if:2017|{{#expr:((((2017)*12+(1)+57608.5 round 0)/12-1.5 round 0)*1461/4-0.5 round 0)-((((2017)*12+(1)+57608.5 round 0)/12-1.5 round 0)/100-0.5 round 0)+((((2017)*12+(1)+57608.5 round 0)/12-1.5 round 0)/400-0.5 round 0)+((((1)+57608.5 round 0)mod 12+4)*153/5-0.5 round 0)+(4)+(12)/24+(0)/1440+(0)/86400-32167.5}}|Parameter 1=year required!}} mod 7}}|Parameter 1=year required!}}|Parameter 2=month required!}}|Parameter 3=day required!}}|{{#expr:2017-1}}|2017}}|12={{#ifexpr:17>=35-{{#if:35|{{#if:12|{{#if:2017|{{#expr:{{#if:2017|{{#expr:((((2017)*12+(12)+57608.5 round 0)/12-1.5 round 0)*1461/4-0.5 round 0)-((((2017)*12+(12)+57608.5 round 0)/12-1.5 round 0)/100-0.5 round 0)+((((2017)*12+(12)+57608.5 round 0)/12-1.5 round 0)/400-0.5 round 0)+((((12)+57608.5 round 0)mod 12+4)*153/5-0.5 round 0)+(35)+(12)/24+(0)/1440+(0)/86400-32167.5}}|Parameter 1=year required!}} mod 7}}|Parameter 1=year required!}}|Parameter 2=month required!}}|Parameter 3=day required!}}|{{#expr:2017+1}}|2017}}|2017}}|Parameter 1=year required!}}|Parameter 2=month required!}}|Parameter 3=day required !}}

See also

Template:CURRENTYEARCC
Template:CURRENTYEARYY
Template:CURRENTCENTURY
Template:CURRENTMONTHDAYS
Template:CURRENTJULIANDAY
Template:CURRENTWEEKDAY
Template:ISOYEAR