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

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(Use showcode parameter to show template. Use collapsible parameter to quickly show when no difference between main template and sandbox. Use output parameter to show markup which is not visible in the displayed output.)
imported>Jonesey95
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{Testcases notice}}
 
{{Testcases notice}}
 +
{{use mdy dates|date=February 2020}}
 +
Set {{para|demospace|main}} to view/set outputted categories for the mainspace.
 +
 +
==YYYY==
 +
{{yes check}} Same
 +
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 +
|1979}}
 +
 +
==YYYY|MM==
 +
{{yes check}} Same
 +
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 +
|1966|9}}
 +
 +
==YYYY|MM|DD==
 +
{{yes check}} Same
 +
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 +
|1969|4|20}}
 +
 +
==XX==
 +
{{not a bug}} New version intentionally blank due to lack of date-like numbers.
 +
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 +
|Antarctica}}
 +
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 +
|Antarctica|Monaco|San Marino|Long Beach}}
 +
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 +
||||Iceland}}
 +
 +
==YYYY|||XX==
 +
{{yes check}} Same
 +
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 +
|1975|||Italy}}
 +
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 +
|1975|||Italy|1977|||Slovenia}}
 +
 +
==YYYY|XX==
 +
{{added|Improved}} Old version disregards location, new version displays good output.
 +
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 +
|1986|Turkey}}
 +
{{added|Improved}} Old version disregards location '''and''' interprets two years as part of same date, new version displays good output.
 +
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 +
|1986|Turkey|1991|Egypt}}
  
Set {{para|demospace|main}} to view/set outputted categories for the mainspace.
+
==YYYY|MM||XX==
 +
{{yes check}} Same
 +
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 +
|1934|6||France}}
 +
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 +
|1934|6||France|1991|9||Belgium}}
 +
 
 +
==YYYY|MM|XX==
 +
{{added|Improved}} Old version chokes, new version displays good output.
 +
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 +
|1953|3|California}}
 +
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 +
|1953|3|California|1959|11|Michigan}}
  
==1991==
+
==YYYY|MM|DD|XX==
{{Testcase table|_showcode=yes|_collapsible=yes|_output=nowiki+
+
{{yes check}} Same
| 1 = 1991
+
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
| 2 = 3
+
|2001|9|11|New York City}}
| 3 = 23
+
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
| 4 = Premiere
+
|2001|9|11|New York City|2015|11|13|Paris}}
| 5 = 1991
 
| 6 = 6
 
| 7 = 30
 
| 8 = United States
 
}}
 
  
{{Testcase table|_showcode=yes|_collapsible=yes|_output=nowiki+
+
==Template followed by reference (use ref1 instead)==
| 1 = 1991
+
===Live template===
| 2 = 3
+
{{film date|df=y|2020|01|23}}<ref>{{cite news|url=https://www.behindwoods.com/tamil-movies-cinema-news-16/mammoottys-shylocks-to-release-on-january-next-year.html|title=MAMMOOTTY’S SHYLOCK’S RELEASE PUSHED TO NEXT YEAR! REASON HERE|website= Behindwoods|access-date=2019-11-20}}</ref>
| 4 = USA
 
}}
 
  
==2016==
+
===Sandbox template===
{{Testcase table|_showcode=yes|_collapsible=yes|_output=nowiki+
+
{{film date/sandbox|df=y|2020|01|23}}<ref>{{cite news|url=https://www.behindwoods.com/tamil-movies-cinema-news-16/mammoottys-shylocks-to-release-on-january-next-year.html|title=MAMMOOTTY’S SHYLOCK’S RELEASE PUSHED TO NEXT YEAR! REASON HERE|website= Behindwoods|access-date=2019-11-20}}</ref>
| 1 = 2016
 
| 2 = 6
 
| 3 = 13
 
}}
 
  
{{Testcase table|_showcode=yes|_collapsible=yes|_output=nowiki+
+
===Using ref1= ===
| 1 = 2016
+
{{testcase table|df=y|2020|01|23|ref1=<ref>{{cite news|url=https://www.behindwoods.com/tamil-movies-cinema-news-16/mammoottys-shylocks-to-release-on-january-next-year.html|title=MAMMOOTTY’S SHYLOCK’S RELEASE PUSHED TO NEXT YEAR! REASON HERE|website= Behindwoods|access-date=2019-11-20}}</ref>}}
| 2 = 6
 
| 4 = USA
 
}}
 
  
==2017==
+
{{reflist-talk}}
{{Test case nowiki|format=columns|collapsible=yes|output=nowiki+
 
|code=<nowiki>{{__TEMPLATENAME__|2017|1|1|TV=y}}</nowiki>
 
}}
 
  
{{Test case nowiki|format=columns|collapsible=yes|output=nowiki+
+
==More than 5, in mixed chronological order, plus some whitespace==
|code=<nowiki>{{__TEMPLATENAME__|2017|3||USA|TV=y}}</nowiki>
+
{{added|Improved}} Old version chokes on whitespace '''and''' stops at 5, new version trims whitespace, displays any number of rows, and sorts them chronologically.
 +
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 +
  |2007|8|9|Kenya
 +
  |2011|||Estonia
 +
  |2003|4|5|Ukraine
 +
  |2001|2|3|France
 +
  |2009|10||Madagascar
 +
  |2005|6|7|Chile
 
}}
 
}}
 
+
===same, but with parameters skipped rather than blank===
==2155==
+
{{added|Improved}} Old version doesn't know what it's doing, new version performs same as previous.
{{Test case nowiki|format=columns|collapsible=yes|output=nowiki+
+
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
|code=<nowiki>{{__TEMPLATENAME__|2155|11|18|df=y}}</nowiki>
+
  |2007|8|9|Kenya
 +
  |2011|Estonia
 +
  |2003|4|5|Ukraine
 +
  |2001|2|3|France
 +
  |2009|10|Madagascar
 +
  |2005|6|7|Chile
 
}}
 
}}
  
{{Test case nowiki|format=columns|collapsible=yes|output=nowiki+
+
===same, with additional degenerate input===
|code=<nowiki>{{__TEMPLATENAME__|2155|11||USA|df=y}}</nowiki>
+
{{added|Improved}} Old version has several errors, new version performs same as previous.
 +
{{Testcase table |_collapsible=yes |_output=nowiki+ |_titlecode=yes
 +
  |2007|8|9|Kenya
 +
  <!-- no date --> |Vatican City
 +
  |2011|Estonia
 +
  |2003|4|5|Ukraine
 +
  <!-- no date --> |North Korea
 +
  |2001|2|3|France
 +
  <!-- no date --> |Trinidad and Tobago
 +
  |2009|10|Madagascar
 +
  |2005|6|7|Chile
 
}}
 
}}

Latest revision as of 19:55, 11 February 2020

Template:Use mdy dates Set |demospace=main to view/set outputted categories for the mainspace.

YYYY

11px Yes Same Template:Testcase table

YYYY|MM

11px Yes Same Template:Testcase table

YYYY|MM|DD

11px Yes Same Template:Testcase table

XX

Template:Not a bug New version intentionally blank due to lack of date-like numbers. Template:Testcase table Template:Testcase table Template:Testcase table

YYYY|||XX

11px Yes Same Template:Testcase table Template:Testcase table

YYYY|XX

16px Improved Old version disregards location, new version displays good output. Template:Testcase table 16px Improved Old version disregards location and interprets two years as part of same date, new version displays good output. Template:Testcase table

YYYY|MM||XX

11px Yes Same Template:Testcase table Template:Testcase table

YYYY|MM|XX

16px Improved Old version chokes, new version displays good output. Template:Testcase table Template:Testcase table

YYYY|MM|DD|XX

11px Yes Same Template:Testcase table Template:Testcase table

Template followed by reference (use ref1 instead)

Live template

  • 23 January 2020 (2020-01-23)

[1]

Sandbox template

  • 23 January 2020 (2020-01-23)

[2]

Using ref1=

Template:Testcase table

Template:Reflist-talk

More than 5, in mixed chronological order, plus some whitespace

16px Improved Old version chokes on whitespace and stops at 5, new version trims whitespace, displays any number of rows, and sorts them chronologically. Template:Testcase table

same, but with parameters skipped rather than blank

16px Improved Old version doesn't know what it's doing, new version performs same as previous. Template:Testcase table

same, with additional degenerate input

16px Improved Old version has several errors, new version performs same as previous.

Template:Testcase table

  1. "MAMMOOTTY'S SHYLOCK'S RELEASE PUSHED TO NEXT YEAR! REASON HERE". Behindwoods. Retrieved November 20, 2019.
  2. "MAMMOOTTY'S SHYLOCK'S RELEASE PUSHED TO NEXT YEAR! REASON HERE". Behindwoods. Retrieved November 20, 2019.