Template:Format date/testcases
| This is the template test cases page for the sandbox of Template:Format date. Script error: No such module "Purge". to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki, see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins with these links: |
Contents
No named parameters
| No parameters |
|---|
{{Format date}}
{{Format date}}
|
| YYY Month |
|---|
{{Format date|1963|December}}
{{Format date}} December 1963 December 1963 |
| YYYY mmm dd |
|---|
{{Format date|1996|oct|31}}
{{Format date}} October 31, 1996 October 31, 1996 |
| YY Month dd hour |
|---|
{{Format date|2012|May|04|3}}
{{Format date}} May 4, 2012 May 4, 2012 |
| Hour and minute |
|---|
{{Format date|2012|May|04|3|1}}
{{Format date}} 03:01, May 4, 2012 03:01, May 4, 2012 |
| Hour and minute 2 |
|---|
{{Format date|2012|May|04|3|01}}
{{Format date}} 03:01, May 4, 2012 03:01, May 4, 2012 |
| All time params; none named |
|---|
{{Format date|2012|May|04|3|20|11}}
{{Format date}} 03:20:11, May 4, 2012 03:20:11, May 4, 2012 |
Named parameters
| 4/20/69 |
|---|
{{Format date|Day=20th|hour=4|minute=20|month=April|second=11|year=1969}}
{{Format date}} 04:20:11, April 1969 04:20:11, April 1969 |
Time zones
| mm before hh |
|---|
{{Format date|2018|12|3|hh=13|mm=12|ss=1|timezone=+7}}
{{Format date}} 13:12:01, December 3, 2018 (+7) 13:12:01, December 3, 2018 (+7) |
| EST |
|---|
{{Format date|2018|12|3|TimeZone=EST|hh=13|minutes=12|ss=1}}
{{Format date}} December 3, 2018 (EST) December 3, 2018 (EST) |
| Time zone Z |
|---|
{{Format date|2018|12|3|hh=12|mm=18|ss=31|tz=Z}}
{{Format date}} 12:18:31, December 3, 2018 (UTC) 12:18:31, December 3, 2018 (UTC) |
Time joiner
| Time joiner |
|---|
{{Format date|2018|12|3|hh=12|mm=18|ss=31|time_joiner=on|tz=Z}}
{{Format date}} 12:18:31 on December 3, 2018 (UTC) 12:18:31 on December 3, 2018 (UTC) |
Hour formats
12 hour time
Unpadded (g)
| 12 hour unpadded time |
|---|
{{Format date|2018|12|3|hh=7|hour_format=g|mm=2|ss=0}}
{{Format date}} 7:02:00 am, December 3, 2018 7:02:00 am, December 3, 2018 |
| 12 hour unpadded time 2 |
|---|
{{Format date|2018|12|3|hh=19|hour_format=g|mm=2|ss=0}}
{{Format date}} 7:02:00 pm, December 3, 2018 7:02:00 pm, December 3, 2018 |
Padded (h)
| 12 hour padded time |
|---|
{{Format date|2018|12|3|hh=7|hour_format=h|mm=2|ss=0}}
{{Format date}} 07:02:00 AM, December 3, 2018 07:02:00 AM, December 3, 2018 |
| 12 hour padded time 2 |
|---|
{{Format date|2018|12|3|hh=19|hour_format=h|mm=2|ss=0}}
{{Format date}} 07:02:00 PM, December 3, 2018 07:02:00 PM, December 3, 2018 |
24 hour time
Unpadded (G)
| 24 hour unpadded time |
|---|
{{Format date|2018|12|3|hh=7|hour_format=G|mm=2|ss=0}}
{{Format date}} 7:02:00, December 3, 2018 7:02:00, December 3, 2018 |
| 24 hour unpadded time 2 |
|---|
{{Format date|2018|12|3|hh=19|hour_format=G|mm=2|ss=0}}
{{Format date}} 19:02:00, December 3, 2018 19:02:00, December 3, 2018 |
Padded (H)
| 24 hour padded time |
|---|
{{Format date|2018|12|3|hh=7|hour_format=H|mm=2|ss=0}}
{{Format date}} 07:02:00, December 3, 2018 07:02:00, December 3, 2018 |
| 24 hour padded time 2 |
|---|
{{Format date|2018|12|3|hh=19|hour_format=H|mm=2|ss=0}}
{{Format date}} 19:02:00, December 3, 2018 19:02:00, December 3, 2018 |
Combined tests
| Time joiner and am/pm 1 |
|---|
{{Format date|2018|12|3|hh=07|hour_format=g|mm=18|ss=31|time_joiner=on|tz=Z}}
{{Format date}} 7:18:31 am on December 3, 2018 (UTC) 7:18:31 am on December 3, 2018 (UTC) |
| Time joiner and am/pm 2 |
|---|
{{Format date|2018|12|3|hh=19|hour_format=g|mm=18|ss=31|time_joiner=on|tz=Z}}
{{Format date}} 7:18:31 pm on December 3, 2018 (UTC) 7:18:31 pm on December 3, 2018 (UTC) |
| Time joiner and AM/PM 1 |
|---|
{{Format date|2018|12|3|hh=07|hour_format=h|mm=18|ss=31|time_joiner=on|tz=Z}}
{{Format date}} 07:18:31 AM on December 3, 2018 (UTC) 07:18:31 AM on December 3, 2018 (UTC) |
| Time joiner and AM/PM 2 |
|---|
{{Format date|2018|12|3|hh=19|hour_format=h|mm=18|ss=31|time_joiner=on|tz=Z}}
{{Format date}} 07:18:31 PM on December 3, 2018 (UTC) 07:18:31 PM on December 3, 2018 (UTC) |
Just hours and less
No hour format supplied
| Just hour |
|---|
{{Format date|hour=14}}
{{Format date}}
|
| Just hour and minutes |
|---|
{{Format date|hour=14|mm=12}}
{{Format date}} 14:12 14:12 |
| hh mm ss |
|---|
{{Format date|hh=14|mm=12|ss=12}}
{{Format date}} 14:12:12 14:12:12 |
12 hour unpadded (g)
| g Just hour |
|---|
{{Format date|hour=14|hour_format=g}}
{{Format date}}
|
| g Just hour and minutes |
|---|
{{Format date|hour=14|hour_format=g|mm=12}}
{{Format date}} 2:12 pm 2:12 pm |
| g hh mm ss |
|---|
{{Format date|hh=14|hour_format=g|mm=12|ss=12}}
{{Format date}} 2:12:12 pm 2:12:12 pm |
12 hour padded (h)
| h Just hour |
|---|
{{Format date|hour=14|hour_format=h}}
{{Format date}}
|
| h Just hour and minutes |
|---|
{{Format date|hour=14|hour_format=h|mm=12}}
{{Format date}} 02:12 PM 02:12 PM |
| h hh mm ss |
|---|
{{Format date|hh=14|hour_format=h|mm=12|ss=12}}
{{Format date}} 02:12:12 PM 02:12:12 PM |
24 hour unpadded (G)
| G Just hour |
|---|
{{Format date|hour=14|hour_format=G}}
{{Format date}}
|
| G Just hour and minutes |
|---|
{{Format date|hour=14|hour_format=G|mm=12}}
{{Format date}} 14:12 14:12 |
| G hh mm ss |
|---|
{{Format date|hh=14|hour_format=G|mm=12|ss=12}}
{{Format date}} 14:12:12 14:12:12 |
24 hour padded (H)
| H Just hour |
|---|
{{Format date|hour=14|hour_format=H}}
{{Format date}}
|
| H Just hour and minutes |
|---|
{{Format date|hour=14|hour_format=H|mm=12}}
{{Format date}} 14:12 14:12 |
| H hh mm ss |
|---|
{{Format date|hh=14|hour_format=H|mm=12|ss=12}}
{{Format date}} 14:12:12 14:12:12 |