Difference between revisions of "Template:Day/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>MSGJ
(proper error checking)
imported>Wbm1058
(synchronize with live template)
Line 1: Line 1:
'''{{FULLPAGENAME}}''' is the {{#iferror:{{#time:z|{{{1|{{PAGENAME}}}}}}}
+
<includeonly>'''{{FULLPAGENAME}}''' is the {{#switch:{{#time:z|{{PAGENAME}}}}
|{{error|Invalid time}}
+
  |0=first
|{{Day/nth day|{{#expr:{{#time:z|{{{1|{{PAGENAME}}}}}}}+1}}}}
+
  |1=second
}}<noinclude>
+
  |2=third
{{documentation}}
+
  |3=fourth
</noinclude>
+
  |4=fifth
 +
  |5=sixth
 +
  |6=seventh
 +
  |7=eighth
 +
  |8=ninth
 +
  |{{ordinal|{{#expr:{{#time:z|{{PAGENAME}}, 2001}}+1}}}}
 +
}} day of the year{{#ifexpr:{{#time:n|{{PAGENAME}}}}<3
 +
  |
 +
  |&#32;({{ordinal|{{#expr:{{#time:z|{{PAGENAME}}, 2000}}+1}}}} in [[leap year]]s)
 +
}} in the [[Gregorian calendar]].{{#switch:{{#expr:364-{{#time:z|{{PAGENAME}}, 2001}}}}
 +
  |0=
 +
  |1=&#32;There is one day remaining until the end of the year.
 +
  |2=&#32;There are two days remaining until the end of the year.
 +
  |3=&#32;There are three days remaining until the end of the year.
 +
  |4=&#32;There are four days remaining until the end of the year.
 +
  |5=&#32;There are five days remaining until the end of the year.
 +
  |6=&#32;There are six days remaining until the end of the year.
 +
  |7=&#32;There are seven days remaining until the end of the year.
 +
  |8=&#32;There are eight days remaining until the end of the year.
 +
  |9=&#32;There are nine days remaining until the end of the year.
 +
  |&#32;There are {{#expr:364-{{#time:z|{{PAGENAME}}, 2001}}}} days remaining until the end of the year{{#ifexpr:{{#time:n|{{PAGENAME}}}}<3
 +
    |&#32;({{#expr:365-{{#time:z|{{PAGENAME}}, 2000}}}} in [[leap year]]s)
 +
    |
 +
  }}.
 +
}} {{#switch:{{#expr: ({{#time:z|{{PAGENAME}}, 2000}} {{#ifexpr:{{#time:n|{{PAGENAME}}}}<3|+1|-1}} ) mod 7 }}
 +
  |0= This date is slightly more likely to fall on a Monday, Thursday or Saturday (58 in 400 years each) than on Tuesday or Wednesday (57), and slightly less likely to occur on a Friday or Sunday (56).
 +
  |1= This date is slightly more likely to fall on a Tuesday, Friday or Sunday (58 in 400 years each) than on Wednesday or Thursday (57), and slightly less likely to occur on a Monday or Saturday (56).
 +
  |2= This date is slightly more likely to fall on a Monday, Wednesday or Saturday (58 in 400 years each) than on Thursday or Friday (57), and slightly less likely to occur on a Tuesday or Sunday (56).
 +
  |3= This date is slightly more likely to fall on a Tuesday, Thursday or Sunday (58 in 400 years each) than on Friday or Saturday (57), and slightly less likely to occur on a Monday or Wednesday (56).
 +
  |4= This date is slightly more likely to fall on a Monday, Wednesday or Friday (58 in 400 years each) than on Saturday or Sunday (57), and slightly less likely to occur on a Tuesday or Thursday (56).
 +
  |5= This date is slightly more likely to fall on a Tuesday, Thursday or Saturday (58 in 400 years each) than on Sunday or Monday (57), and slightly less likely to occur on a Wednesday or Friday (56).
 +
  |6= This date is slightly more likely to fall on a Wednesday, Friday or Sunday (58 in 400 years each) than on Monday or Tuesday (57), and slightly less likely to occur on a Thursday or Saturday (56).
 +
}}</includeonly><noinclude>{{Documentation}}</noinclude>

Revision as of 10:25, 20 September 2016

Template documentation[view] [edit] [history] [purge]
Template:Subpage other

Usage

This template is the article lead for the pages January 1 through December 31, but is not used on February 29. The template is not supposed to be a countdown clock for the current year, but rather should be a consistent lead that produces the same output regardless of the current year.

See also

[edit] all subsections that follow:

Multiple units of time

Type Adjustable Current Last Next
Date and time {{time}} {{Currentdate}} (MDY)
{{Plain now}} (DMY)
{{Now}} (DMY in a complete sentence)
{{Simple now}}
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)
Timestamp {{Timestamp}}
(Format YYYYMMDDhhmmss)

Single units of time

Unit of time Adjustable Current Last Next
SECOND {{CURRENTSECOND}}
MINUTE {{CURRENTMINUTE}}
HOUR {{CURRENTHOUR}} {{Hour-1}} {{Hour+1}}
WEEK {{CURRENTWEEK}}
{{CURRENTWEEKOFMONTH}}
Day of Week {{Dow}} {{CURRENTDAYNAME}}
{{CURRENTWEEKDAYABBREV}}
{{CURRENTWEEKDAY}}
{{LASTWEEKDAYNAME}}
{{LASTWEEKDAYABBREV}}
{{NEXTWEEKDAYNAME}}
{{NEXTWEEKDAYABBREV}}
MONTH {{MONTHNAME}}
{{MONTHABBREV}}
{{MONTHNUMBER}}
{{MONTH}} (zero padded)
{{CURRENTMONTHNAME}}
{{CURRENTMONTHABBREV}}
{{CURRENTMONTH1}}
{{CURRENTMONTHDAYS}}
{{LASTMONTH}}
(Can make not zero-padded)
{{LASTMONTHNAME}}
{{LASTMONTHABBR}}
{{NEXTMONTH}}
(Can make not zero-padded)
{{NEXTMONTHNAME}}
{{NEXTMONTHABBR}}
Day of Month {{CURRENTDAY}}
{{CURRENTDAY2}} (zero padded)
YEAR {{CURRENTYEARCC}}
{{CURRENTYEARYY}}
{{CURRENTISOYEAR}}
{{CURRENTYEAR}}
{{LASTYEAR}} {{NEXTYEAR}}
Day of Year {{CURRENTDAYOFYEAR}}
DECADE {{DECADE}} {{CURRENTDECADE}} {{LASTDECADE}} {{NEXTDECADE}}
CENTURY {{CENTURY}} {{CURRENTCENTURY}} {{LASTCENTURY}} {{NEXTCENTURY}}
MILLENNIUM {{MILLENNIUM}} {{Currentmillennium}}

Date and time templates made for substitution:

Month:
{{Lmonth}} produces Nov
{{Nmonth}} produces Jan
{{LastMonth}} produces November 2025
{{NextMonth}} produces January 2026


Individual templates

Categories of templates