Template:Format time/testcases

From blackwiki
Jump to navigation Jump to search


No named parameters

Hour and minute
{{Format time|04|1}}

{{Format time}}

04:01

{{Format time/sandbox}}

04:01

Hour and minute 2
{{Format time|3|01}}

{{Format time}}

03:01

{{Format time/sandbox}}

03:01

All time params; none named
{{Format time|3|20|11}}

{{Format time}}

03:20:11

{{Format time/sandbox}}

03:20:11

Named parameters

named hour, minute and second
{{Format time|hour=4|minute=20|second=11}}

{{Format time}}

04:20:11

{{Format time/sandbox}}

04:20:11

Time zones

mm before hh
{{Format time|hh=13|mm=12|ss=1|timezone=+7}}

{{Format time}}

13:12:01 (+7)

{{Format time/sandbox}}

13:12:01 (+7)

EST
{{Format time|TimeZone=EST|hh=13|minutes=12|ss=1}}

{{Format time}}

(EST)

{{Format time/sandbox}}

(EST)

Time zone Z
{{Format time|hh=12|mm=18|sec=31|tz=Z}}

{{Format time}}

12:18:31 (UTC)

{{Format time/sandbox}}

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

{{Format time/sandbox}}

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

{{Format time/sandbox}}

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

{{Format time/sandbox}}

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

{{Format time/sandbox}}

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

{{Format time/sandbox}}

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

{{Format time/sandbox}}

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

{{Format time/sandbox}}

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

{{Format time/sandbox}}

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)

{{Format time/sandbox}}

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)

{{Format time/sandbox}}

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)

{{Format time/sandbox}}

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)

{{Format time/sandbox}}

07:18:31 PM (UTC)

Just hours and less

No hour format supplied

Just hour
{{Format time|hour=14}}

{{Format time}}


{{Format time/sandbox}}


Just hour and minutes
{{Format time|hour=14|mm=12}}

{{Format time}}

14:12

{{Format time/sandbox}}

14:12

hh mm ss
{{Format time|hh=14|mm=12|ss=12}}

{{Format time}}

14:12:12

{{Format time/sandbox}}

14:12:12

12 hour unpadded (g)

g Just hour
{{Format time|hour=14|hour_format=g}}

{{Format time}}


{{Format time/sandbox}}


g Just hour and minutes
{{Format time|hour=14|hour_format=g|mm=12}}

{{Format time}}

2:12 pm

{{Format time/sandbox}}

2:12 pm

g hh mm ss
{{Format time|hh=14|hour_format=g|mm=12|ss=12}}

{{Format time}}

2:12:12 pm

{{Format time/sandbox}}

2:12:12 pm

12 hour padded (h)

h Just hour
{{Format time|hour=14|hour_format=h}}

{{Format time}}


{{Format time/sandbox}}


h Just hour and minutes
{{Format time|hour=14|hour_format=h|mm=12}}

{{Format time}}

02:12 PM

{{Format time/sandbox}}

02:12 PM

h hh mm ss
{{Format time|hh=14|hour_format=h|mm=12|ss=12}}

{{Format time}}

02:12:12 PM

{{Format time/sandbox}}

02:12:12 PM

24 hour unpadded (G)

G Just hour
{{Format time|hour=14|hour_format=G}}

{{Format time}}


{{Format time/sandbox}}


G Just hour and minutes
{{Format time|hour=14|hour_format=G|mm=12}}

{{Format time}}

14:12

{{Format time/sandbox}}

14:12

G hh mm ss
{{Format time|hh=14|hour_format=G|mm=12|ss=12}}

{{Format time}}

14:12:12

{{Format time/sandbox}}

14:12:12

24 hour padded (H)

H Just hour
{{Format time|hour=14|hour_format=H}}

{{Format time}}


{{Format time/sandbox}}


H Just hour and minutes
{{Format time|hour=14|hour_format=H|mm=12}}

{{Format time}}

14:12

{{Format time/sandbox}}

14:12

H hh mm ss
{{Format time|hh=14|hour_format=H|mm=12|ss=12}}

{{Format time}}

14:12:12

{{Format time/sandbox}}

14:12:12