Difference between revisions of "Template:Format time/doc"
Jump to navigation
Jump to search
test>Daviddwd |
test>Daviddwd |
||
| Line 3: | Line 3: | ||
== Usage == | == Usage == | ||
| − | |||
==See also== | ==See also== | ||
| Line 33: | Line 32: | ||
"minute": { | "minute": { | ||
"aliases": [ | "aliases": [ | ||
| − | " | + | "mm", |
"2" | "2" | ||
], | ], | ||
| Line 43: | Line 42: | ||
"suggested": true | "suggested": true | ||
}, | }, | ||
| − | |||
"second": { | "second": { | ||
"aliases": [ | "aliases": [ | ||
| Line 60: | Line 58: | ||
"description": "Formats hours and whether to render AM/PM or a.m./p.m.", | "description": "Formats hours and whether to render AM/PM or a.m./p.m.", | ||
"example": "g (7:00 p.m.), G (07:00 PM), h (19:00), or H (19:00)" | "example": "g (7:00 p.m.), G (07:00 PM), h (19:00), or H (19:00)" | ||
| + | }, | ||
| + | "timezone": { | ||
| + | "aliases": [ | ||
| + | "tz", | ||
| + | "TimeZone", | ||
| + | "4" | ||
| + | ], | ||
| + | "description": "A numerical offset from UTC, or 'Z'. If non-empty, shows time zone", | ||
| + | "example": "Z", | ||
| + | "type": "string" | ||
} | } | ||
}, | }, | ||
| Line 66: | Line 74: | ||
"minute", | "minute", | ||
"second", | "second", | ||
| − | "hour_format" | + | "hour_format", |
| − | ] | + | "timezone" |
| + | ], | ||
| + | "description": "If input, shows timezone" | ||
} | } | ||
</templatedata> | </templatedata> | ||
Revision as of 19:30, 12 December 2018
| This is a documentation subpage for Template:Format time. It contains usage information, categories and other content that is not part of the original template page. |
Contents
Usage
See also
- {{Format date}} for dates, with times optional
[] 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
| 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
Date and time templates made for substitution:
Month:
{{Lmonth}} produces Oct
{{Nmonth}} produces Dec
{{LastMonth}} produces October 2025
{{NextMonth}} produces December 2025
Individual templates
- {{Calendar}}
- {{Calendar clock with Wikipedia stats}}
- {{Clock}}
- {{Digital clock}}
- {{Digital clock and date}}
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
Template Data
This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.
TemplateData for Format time
If input, shows timezone
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Hour | hour hh 1 | Hour of the day, in 24 hour format
| Number | required |
| Minute | minute mm 2 | minutes after the hour
| Number | suggested |
| Second | second ss sec 3 | Seconds after the minute | Number | optional |
| Hour format | hour_format | Formats hours and whether to render AM/PM or a.m./p.m.
| String | suggested |
| Timezone | timezone tz TimeZone 4 | A numerical offset from UTC, or 'Z'. If non-empty, shows time zone
| String | optional |