Jump to content

Template:Day-1/doc

From NicheWork
Revision as of 23:55, 6 January 2026 by w>Peterwhy (Usage: Document behaviour near year start and leap day)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

{{day-1}} subtracts one from a date or date-specific pagename

Usage

{{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}} January 25
{{Day-1|January 1}} December 31
{{Day-1|January 1, 2004 2004}} December 31, 2003
{{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|March 1}} February 28
{{Day-1|March 1, 2004}} February 29
{{Day-1|March 1, 2005}} February 28
{{day-1|{{day-1}}}} January 24
{{day-1|{{Currentmonthday}}|Wikipedia:Today's featured article/|{{CURRENTYEAR}}}} Wikipedia:Today's featured article/January 25, 2026
''[http://en.wikipedia.org/w/wiki.phtml?title=Wikipedia:POTD_row/{{day-1|4=_}},_{{CURRENTYEAR}}&action=edit Edit]'' Edit

See also

Multiple units of time

Type Adjustable Current Last Next
Date and time
Date only
Month and year only
Time only
  • {{Timeonly}} (Adjustable to 12 h format)
Banners
  • {{Right now}}
    (Blue with time and number of Wikipedia articles)
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

Individual templates

Categories of templates