Template:Day-1/doc
This is a documentation subpage for Template:Day-1. It may contain usage information, categories and other content that is not part of the original template page. |
This template is used on many pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
{{day-1}}
subtracts one from a date or date-specific pagename
Usage
change{{Day-1}}
- returns yesterday's date
{{Day-1|date}}
- returns the day before the 'date' passed
{{Day-1|date|pagename|year|spacingchar}}
- returns the name of the page one day before the 'datepage' passed in
- Example
Code | Result |
---|---|
{{Day-1}}
|
November 22 |
{{Day-1|February 28}}
|
February 27 |
{{Day-1|February 28|Wikipedia:Today's featured article/|2004}}
|
Wikipedia:Today's featured article/February 27, 2004 |
{{day-1|{{day-1}}}}
|
November 21 |
{{day-1|{{Currentmonthday}}|Wikipedia:Today's featured article/|{{CURRENTYEAR}}}}
|
Wikipedia:Today's featured article/November 22, 2024 |
''[http://en.wikipedia.org/w/wiki.phtml?title=Wikipedia:POTD_row/{{day-1|4=_}},_{{CURRENTYEAR}}&action=edit Edit]''
|
Edit |
See also
change[
] all subsections that follow:
This template does not put a working clock on your page. The clock will not update the time on your screen every minute. Instead, it records the date and time that the page was most recently edited or purged. If you want a clock that constantly updates, then go to Special:Preferences#mw-prefsection-gadgets and enable the Appearance item, "Add a clock to the personal toolbar that displays the current time in UTC and provides a link to purge the current page". |
Multiple units of time
changeType | Adjustable | Current | Last | Next |
---|---|---|---|---|
Date and Time | {{time}} | {{Currentdate}} (MDY) {{Plain now}} (DMY) {{Now}} (DMY in a complete sentence) |
||
Date Only | {{Dateonly}} {{Datedow}} (Has the day of the week) |
{{Date}} (Chose format) {{DATE}} (prefixed by date=) {{TODAY}} (DMY) |
{{Yesterday}} {{Day-1}} |
{{Tomorrow}} {{Day+1}} |
Time only | {{Timeonly}} | {{CURRENTTIME}} (12 h format) {{CURRENTTIME24}} (24 h format) |
||
Banners | {{Right now}} (Blue with time and number of Wikipedia articles) {{Right now (User message)}} (Orange with time and number of Wikipedia articles |
|||
Timestamp | {{Timestamp}} (Format YYYYMMDDhhmmss) |
Single units of time
changeUnit of time | Adjustable | Current | Last | Next |
---|---|---|---|---|
SECOND | {{CURRENTSECOND}} | |||
MINUTE | {{CURRENTMINUTE}} | |||
HOUR | {{CURRENTHOUR}} | |||
WEEK | {{CURRENTWEEK}} {{CURRENTWEEKOFMONTH}} |
|||
Day of Week | {{DAYOFWEEK}} | {{CURRENTDAYNAME}} {{CURRENTWEEKDAYABBREV}} {{CURRENTWEEKDAY}} |
||
MONTH | {{MONTHNAME}} {{MONTHABBREV}} {{MONTHNUMBER}} {{MONTH}} (zero padded) |
{{CURRENTMONTHNAME}} {{CURRENTMONTHABBREV}} {{CURRENTMONTH1}} {{CURRENTMONTHDAYS}} |
{{LASTMONTHNAME}} | {{NEXTMONTHNAME}} |
Day of Month | {{CURRENTDAY}} {{CURRENTDAY2}} (zero padded) |
|||
YEAR | {{CURRENTYEARCC}} {{CURRENTYEARYY}} {{CURRENTISOYEAR}} {{CURRENTYEAR}} |
{{LASTYEAR}} | {{NEXTYEAR}} | |
Day of Year | {{CURRENTDAYOFYEAR}} | |||
DECADE | {{DECADE}} | {{CURRENTDECADE}} | ||
CENTURY | {{CENTURY}} | {{CURRENTCENTURY}} | ||
MILLENNIUM | {{MILLENNIUM}} |
Date and time Templates made for substitution:
changeMonth:
{{Lmonth}} produces Oct
{{Nmonth}} produces Dec
{{LastMonth}} produces October 2024
{{NextMonth}} produces December 2024
Individual Templates
change- {{Calendar}}
- {{Calendar clock with Wikipedia stats}}
- {{Clock}}
- {{Digital clock and date}}
Categories of Templates
change- 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