This is the template test cases page for the sandbox of Template:Format time. 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 and parsers with these links: |
No named parameters
editHour and minute
Hour and minute 2
All time params; none named
Named parameters
editnamed hour, minute and second
Time zones
editmm before hh
EST
Time zone Z
Hour formats
edit12 hour time
editUnpadded (g)
edit12 hour unpadded time
12 hour unpadded time 2
Padded (h)
edit12 hour padded time
12 hour padded time 2
24 hour time
editUnpadded (G)
edit24 hour unpadded time
24 hour unpadded time 2
Padded (H)
edit24 hour padded time
24 hour padded time 2
Combined tests
editTime 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
editNo hour format supplied
editJust hour
Just hour and minutes
hh mm ss
12 hour unpadded (g)
editg Just hour
g Just hour and minutes
g hh mm ss
12 hour padded (h)
edith Just hour
h Just hour and minutes
h hh mm ss
24 hour unpadded (G)
editG Just hour
G Just hour and minutes
G hh mm ss
24 hour padded (H)
editH Just hour
H Just hour and minutes
H hh mm ss