Template:Format time/testcases
| This is the template test cases page for the sandbox of Template:Format time. 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
| Hour and minute |
|---|
{{Format time|04|1}}
{{Format time}} 04:01 04:01 |
| Hour and minute 2 |
|---|
{{Format time|3|01}}
{{Format time}} 03:01 03:01 |
| All time params; none named |
|---|
{{Format time|3|20|11}}
{{Format time}} 03:20:11 03:20:11 |
Named parameters
| named hour, minute and second |
|---|
{{Format time|hour=4|minute=20|second=11}}
{{Format time}} 04:20:11 04:20:11 |
Time zones
| mm before hh |
|---|
{{Format time|hh=13|mm=12|ss=1|timezone=+7}}
{{Format time}} 13:12:01 (+7) 13:12:01 (+7) |
| EST |
|---|
{{Format time|TimeZone=EST|hh=13|minutes=12|ss=1}}
{{Format time}} (EST) (EST) |
| Time zone Z |
|---|
{{Format time|hh=12|mm=18|sec=31|tz=Z}}
{{Format time}} 12:18:31 (UTC) 12:18:31 (UTC) |
Hour formats
12 hour time
Unpadded (g)
| 12 hour unpadded time |
|---|
{{Format time|2018|12|3|hh=7|hour_format=g|mm=2|ss=0}}
{{Format time}} 7:02:00 am 7:02:00 am |
| 12 hour unpadded time 2 |
|---|
{{Format time|2018|12|3|hh=19|hour_format=g|mm=2|ss=0}}
{{Format time}} 7:02:00 pm 7:02:00 pm |
Padded (h)
| 12 hour padded time |
|---|
{{Format time|2018|12|3|hh=7|hour_format=h|mm=2|ss=0}}
{{Format time}} 07:02:00 AM 07:02:00 AM |
| 12 hour padded time 2 |
|---|
{{Format time|2018|12|3|hh=19|hour_format=h|mm=2|ss=0}}
{{Format time}} 07:02:00 PM 07:02:00 PM |
24 hour time
Unpadded (G)
| 24 hour unpadded time |
|---|
{{Format time|2018|12|3|hh=7|hour_format=G|mm=2|ss=0}}
{{Format time}} 7:02:00 7:02:00 |
| 24 hour unpadded time 2 |
|---|
{{Format time|2018|12|3|hh=19|hour_format=G|mm=2|ss=0}}
{{Format time}} 19:02:00 19:02:00 |
Padded (H)
| 24 hour padded time |
|---|
{{Format time|2018|12|3|hh=7|hour_format=H|mm=2|ss=0}}
{{Format time}} 07:02:00 07:02:00 |
| 24 hour padded time 2 |
|---|
{{Format time|2018|12|3|hh=19|hour_format=H|mm=2|ss=0}}
{{Format time}} 19:02:00 19:02:00 |
Combined tests
| Time joiner and am/pm 1 |
|---|
{{Format time|2018|12|3|hh=07|hour_format=g|mm=18|ss=31|tz=Z}}
{{Format time}} 7:18:31 am (UTC) 7:18:31 am (UTC) |
| Time joiner and am/pm 2 |
|---|
{{Format time|2018|12|3|hh=19|hour_format=g|mm=18|ss=31|tz=Z}}
{{Format time}} 7:18:31 pm (UTC) 7:18:31 pm (UTC) |
| Time joiner and AM/PM 1 |
|---|
{{Format time|2018|12|3|hh=07|hour_format=h|mm=18|ss=31|tz=Z}}
{{Format time}} 07:18:31 AM (UTC) 07:18:31 AM (UTC) |
| Time joiner and AM/PM 2 |
|---|
{{Format time|2018|12|3|hh=19|hour_format=h|mm=18|ss=31|tz=Z}}
{{Format time}} 07:18:31 PM (UTC) 07:18:31 PM (UTC) |
Just hours and less
No hour format supplied
| Just hour |
|---|
{{Format time|hour=14}}
{{Format time}}
|
| Just hour and minutes |
|---|
{{Format time|hour=14|mm=12}}
{{Format time}} 14:12 14:12 |
| hh mm ss |
|---|
{{Format time|hh=14|mm=12|ss=12}}
{{Format time}} 14:12:12 14:12:12 |
12 hour unpadded (g)
| g Just hour |
|---|
{{Format time|hour=14|hour_format=g}}
{{Format time}}
|
| g Just hour and minutes |
|---|
{{Format time|hour=14|hour_format=g|mm=12}}
{{Format time}} 2:12 pm 2:12 pm |
| g hh mm ss |
|---|
{{Format time|hh=14|hour_format=g|mm=12|ss=12}}
{{Format time}} 2:12:12 pm 2:12:12 pm |
12 hour padded (h)
| h Just hour |
|---|
{{Format time|hour=14|hour_format=h}}
{{Format time}}
|
| h Just hour and minutes |
|---|
{{Format time|hour=14|hour_format=h|mm=12}}
{{Format time}} 02:12 PM 02:12 PM |
| h hh mm ss |
|---|
{{Format time|hh=14|hour_format=h|mm=12|ss=12}}
{{Format time}} 02:12:12 PM 02:12:12 PM |
24 hour unpadded (G)
| G Just hour |
|---|
{{Format time|hour=14|hour_format=G}}
{{Format time}}
|
| G Just hour and minutes |
|---|
{{Format time|hour=14|hour_format=G|mm=12}}
{{Format time}} 14:12 14:12 |
| G hh mm ss |
|---|
{{Format time|hh=14|hour_format=G|mm=12|ss=12}}
{{Format time}} 14:12:12 14:12:12 |
24 hour padded (H)
| H Just hour |
|---|
{{Format time|hour=14|hour_format=H}}
{{Format time}}
|
| H Just hour and minutes |
|---|
{{Format time|hour=14|hour_format=H|mm=12}}
{{Format time}} 14:12 14:12 |
| H hh mm ss |
|---|
{{Format time|hh=14|hour_format=H|mm=12|ss=12}}
{{Format time}} 14:12:12 14:12:12 |