Template:DatesWD/doc
| This is a documentation subpage for Template:DatesWD. It may contain usage information, categories and other content that is not part of the original template page. |
Usage
| This template uses Lua: |
An asterisk "*" marks non-specified parameters, and which in this case are taken equal to their current values.
{{DatesWD|1}}gives first Saturday* in June* of 2026* — 2026-06-06{{DatesWD|2|4}}gives second Thursday in June* of 2026* — 2026-06-11{{DatesWD|-1|0|12|date=wiki}}gives last Sunday in December of 2026* in a short wiki link format — December 27{{DatesWD|4|3|9|2011|format=%a %d %b %Y}}gives fourth Wednesday in September of 2011 in some #Lua date format — Wed 28 Sep 2011{{DatesWD|1|2|3|date=1}}gives first Tuesday of March in next year — March 02, 2027{{DatesWD|3|5|2|date=-1}}gives third Friday of February in last year — February 21, 2025{{DatesWD|-2|6|7|{{#expr:{{CURRENTYEAR}}-1}}|date=wiki_long}}gives penultimate Saturday in July for last year in a long wiki link format — June 21, 2025
Lua date format
If you use the |date= parameter, then this format does not work.
- %a abbreviated weekday name (e.g., Wed)
- %A full weekday name (e.g., Wednesday)
- %b abbreviated month name (e.g., Sep)
- %B full month name (e.g., September)
- %x date (e.g., 09/16/98)
- %d day of the month (16) [01-31]
- %m month (09) [01-12]
- %w weekday (3) [0-6 = Sunday-Saturday]
- %Y full year (1998)
- %y two-digit year (98) [00-99]
Template Data
Calculation of non-fixed dates on the nth day of the week in a given month (and a year).
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Nth | 1 | 1 = first, 2 = second, etc. -1 = last, -2 = penultimate, etc
| Number | required |
| Day of the week | 2 | 0 = Sunday, 1 = Monday, ... 6 = Saturday
| Number | suggested |
| Month | 3 | 1 = January, 2 = February, ... 12 = December
| Number | suggested |
| Year | 4 | Fore digits year
| Number | optional |
| Wiki date output formats | date | MD/wiki for [[January 1]] format, MDY/wiki_long for [[December 31, 2018]] format | Line | optional |
| Lua output format | format | %x for date format MM/DD/YY or others, default YYYY-MM-DD
| Line | optional |
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.