Changes

Jump to navigation Jump to search
m
{{Documentation subpage}}
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->

This template computes the week day number (from 0 on Monday to 6 on Sunday) for the date of the [[Gregorian calendar]] (or proleptic) in parameter.

=== Syntax ===
: <tt><nowiki>{{</nowiki>WEEKDAY|</tt>''year''<tt>|</tt>''month''<tt>|</tt>''day''<tt>}}</tt>
* 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.

The Julian day number (which is the integer part of the [[Julian day]] plus one) modulo 7 grows from 0 (on Monday at noon) to 6 (on Sunday at noon) and returns to 0 the next day on Monday at noon (however this template ignores time, so this number is valid for the whole day from zero o'clock to midnight). This numbering order matches the order of days in the ISO week (but NOT the absolute numeric value, and not the US week day order and numbering).

=== Examples ===
* <tt><nowiki>{{WEEKDAY|2000|1|1}}</nowiki></tt> returns {{WEEKDAY|2000|1|1}}
* <tt><nowiki>{{WEEKDAY|2000|2|28}}</nowiki></tt> returns {{WEEKDAY|2000|2|28}}
* <tt><nowiki>{{WEEKDAY|2000|3|1}}</nowiki></tt> returns {{WEEKDAY|2000|3|1}}
* <tt><nowiki>{{WEEKDAY|2000|12|31}}</nowiki></tt> returns {{WEEKDAY|2000|12|31}}
* <tt><nowiki>{{WEEKDAY|2001|1|1}}</nowiki></tt> returns {{WEEKDAY|2001|1|1}}
* <tt><nowiki>{{WEEKDAY|2001|2|28}}</nowiki></tt> returns {{WEEKDAY|2001|2|28}}
* <tt><nowiki>{{WEEKDAY|2001|3|1}}</nowiki></tt> returns {{WEEKDAY|2001|3|1}}
* <tt><nowiki>{{WEEKDAY|2001|12|31}}</nowiki></tt> returns {{WEEKDAY|2001|12|31}}
* <tt><nowiki>{{WEEKDAY|2006|2|28}}</nowiki></tt> returns {{WEEKDAY|2006|2|28}}
* <tt><nowiki>{{WEEKDAY|2006|3|1}}</nowiki></tt> returns {{WEEKDAY|2006|3|1}}
* <tt><nowiki>{{WEEKDAY|2006|4|22}}</nowiki></tt> returns {{WEEKDAY|2006|4|22}}

=== See also ===
{{Calendar, clock, date and time computing templates}}

<includeonly>
<!-- ADD CATEGORIES BELOW THIS LINE -->
[[Category:Date-computing templates|{{PAGENAME}}]]

<!-- ADD INTERWIKIS BELOW THIS LINE -->
</includeonly>

<includeonly>
[[bn:টেমপ্লেট:WEEKDAY]]
[[hsb:Předłoha:WEEKDAY]]
[[ja:Template:WEEKDAY]]
</includeonly>
Anonymous user

Navigation menu