Difference between revisions of "Template:Format date/testcases"

From blackwiki
Jump to navigation Jump to search
imported>Daviddwd
imported>Daviddwd
Line 63: Line 63:
 
{{Test case|_collapsible=yes|_showcode=yes|_title=12 hour padded time 2
 
{{Test case|_collapsible=yes|_showcode=yes|_title=12 hour padded time 2
 
|2018|12|3|hh=19|mm=2|ss=0|hour_format=h}}
 
|2018|12|3|hh=19|mm=2|ss=0|hour_format=h}}
 
  
 
=== 24 hour time ===
 
=== 24 hour time ===
Line 82: Line 81:
 
{{Test case|_collapsible=yes|_showcode=yes|_title=24 hour padded time 2
 
{{Test case|_collapsible=yes|_showcode=yes|_title=24 hour padded time 2
 
|2018|12|3|hh=19|mm=2|ss=0|hour_format=H}}
 
|2018|12|3|hh=19|mm=2|ss=0|hour_format=H}}
 +
 +
== Combined tests ==
 +
 +
{{Test case|_collapsible=yes|_showcode=yes|_title=Time joiner and am/pm 1
 +
|2018|12|3|hh=07|mm=18|ss=31|tz=Z|time_joiner=on|hour_format=g}}
 +
 +
{{Test case|_collapsible=yes|_showcode=yes|_title=Time joiner and am/pm 2
 +
|2018|12|3|hh=19|mm=18|ss=31|tz=Z|time_joiner=on|hour_format=g}}
 +
 +
{{Test case|_collapsible=yes|_showcode=yes|_title=Time joiner and AM/PM 1
 +
|2018|12|3|hh=07|mm=18|ss=31|tz=Z|time_joiner=on|hour_format=h}}
 +
 +
{{Test case|_collapsible=yes|_showcode=yes|_title=Time joiner and AM/PM 2
 +
|2018|12|3|hh=19|mm=18|ss=31|tz=Z|time_joiner=on|hour_format=h}}
  
 
<!--
 
<!--

Revision as of 21:30, 3 December 2018


No named parameters

No parameters
{{Format date}}

{{Format date}}


{{Format date/sandbox}}


YYY Month
{{Format date|1963|December}}

{{Format date}}

December 1963

{{Format date/sandbox}}

December 1963

YYYY mmm dd
{{Format date|1996|oct|31}}

{{Format date}}

October 31, 1996

{{Format date/sandbox}}

October 31, 1996

Just hour
{{Format date|2012|May|04|3}}

{{Format date}}

May 4, 2012

{{Format date/sandbox}}

May 4, 2012

Hour and minute
{{Format date|2012|May|04|3|1}}

{{Format date}}

03:01, May 4, 2012

{{Format date/sandbox}}

03:01, May 4, 2012

Hour and minute 2
{{Format date|2012|May|04|3|01}}

{{Format date}}

03:01, May 4, 2012

{{Format date/sandbox}}

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

{{Format date/sandbox}}

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

{{Format date/sandbox}}

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)

{{Format date/sandbox}}

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)

{{Format date/sandbox}}

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)

{{Format date/sandbox}}

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)

{{Format date/sandbox}}

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

{{Format date/sandbox}}

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

{{Format date/sandbox}}

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

{{Format date/sandbox}}

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

{{Format date/sandbox}}

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

{{Format date/sandbox}}

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

{{Format date/sandbox}}

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

{{Format date/sandbox}}

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

{{Format date/sandbox}}

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)

{{Format date/sandbox}}

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)

{{Format date/sandbox}}

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)

{{Format date/sandbox}}

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)

{{Format date/sandbox}}

07:18:31 PM on December 3, 2018 (UTC)