Template:Weekday/doc
| This is a documentation subpage for Template:Weekday. It may contain usage information, categories and other content that is not part of the original template page. |
This template computes the ISO week date day number (from 1 on Monday to 7 on Sunday) for the date of the Gregorian calendar (or proleptic) in parameter.
Usage
Syntax
{{WEEKDAY|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.
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
{{WEEKDAY|-4799|3|1}}returns 4 (proleptic) (in year 4800 BC), first Gregorian date where the result is warrantied to be correct by {{JULIANDAY}}{{WEEKDAY|-4799|3|2}}returns 5 (proleptic) (in year 4800 BC), tests the 1 day increment{{WEEKDAY|-4713|11|24}}returns 1 (proleptic) (in year 4714 BC){{WEEKDAY|2000|2|28}}returns 1{{WEEKDAY|2000|3|1}}returns 3{{WEEKDAY|2000|12|31}}returns 7{{WEEKDAY|2001|1|1}}returns 1{{WEEKDAY|2001|2|28}}returns 3{{WEEKDAY|2001|3|1}}returns 4{{WEEKDAY|2001|12|31}}returns 1{{WEEKDAY|2006|2|28}}returns 2{{WEEKDAY|2006|3|1}}returns 3{{WEEKDAY|2006|4|22}}returns 6{{WEEKDAY|2026|6|6}}returns 6
See also
Multiple units of time
| Type | Adjustable | Current | Last | Next |
|---|---|---|---|---|
| Date and time |
|
|
||
| Date only | ||||
| Month and year only |
|
| ||
| Time only |
|
|
||
| Banners |
|
|||
| Timestamp |
|
Single units of time
| Unit of time | Adjustable | Current | Last | Next |
|---|---|---|---|---|
| Second |
|
|||
| Minute |
|
|||
| Hour |
|
|||
| Week |
|
|||
| Day of Week |
|
|
||
| Month |
|
|
|
|
| Day of Month |
|
|||
| Year |
|
|
| |
| Day of Year |
|
|||
| Decade |
|
|
||
| Century |
|
|
||
| Millenium |
|
Date and time templates made for substitution
Parser functions
- mw:Special:MyLanguage/time permits a custom time specifier string, similar to the C date and time functions
Individual templates
- {{Calendar}}
- {{Calendar clock with Wikipedia stats}}
- {{Clock}}
- {{Digital clock}}
- {{Digital clock and date}}
- {{Infobox calendar date today}}
Categories of templates
- Category:Time, date and calendar templates
- Category:Date-computing templates
- Category:Date-computing templates based on current time
- Category:ISO date templates
- Category:Calendar templates
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.