Difference between revisions of "Template:Cite news/testcases"

From Chevy Wiki
Jump to navigation Jump to search
m (1 revision)
 
m (1 revision)
 
Line 1: Line 1:
{{Citation/core
Test cases to support changes to [[Template:Cite news]] from [http://en.wikipedia.org/w/index.php?title=Template:Cite_news/sandbox&oldid=242501446 this version] of [[Template:Cite news/sandbox]]
  |Citation class=press release
 
  |Surname1 = {{{publisher|}}}
== Linked retrieval dates ==
  |Year={{{year|{{    <!-- attempt to derive year from date, if possible -->
=== Current template ===
            #if: {{{date|}}}
;To display linked retrieval dates, must be in ISO format, or broken otherwise
            |{{
<code><nowiki>{{cite news | title = Article | work = The News | date = 27 October 1920 | accessdate = 2008-01-19 | page = 22 }}</nowiki></code>
                #iferror:{{#time:Y|{{{date|}}} }}
* {{cite news | title = Article | work = The News | date = 27 October 1920 | accessdate = 2008-01-19 | page = 22 }}
                |{{#iferror:{{#time:Y|{{{publication-date|einval}}} }}||{{#time:Y|{{{publication-date|}}} }}}}
;Broken for non-ISO format
                |{{#time:Y|{{{date|}}} }}
<code><nowiki>{{cite news | title = Article | work = The News | date = 27 October 1920 | accessdate = 19 January 2008 | page = 22 }}</nowiki></code>
              }}
* {{cite news | title = Article | work = The News | date = 27 October 1920 | accessdate = 19 January 2008 | page = 22 }}
            |{{{publication-date|}}} <!-- last resort -->
=== Sandbox template ===
          }}
Linked retrieval dates can use ISO format or add optional <code>accessyear</code> parameter
        }}}
;ISO format works as before
  |Date = {{#if:{{{date|}}}|{{{date}}}|{{{day|}}} {{{month|}}} {{{year|{{{publication-date|}}}}}}}}
<code><nowiki>{{cite news/sandbox | title = Article | work = The News | date = 27 October 1920 | accessdate = 2008-01-19 | page = 22 }}</nowiki></code>
  |Title={{{title|}}}
* {{cite news/sandbox | title = Article | work = The News | date = 27 October 1920 | accessdate = 2008-01-19 | page = 22 }}
  |URL={{{url|}}}
;Non-ISO format in <code>accessdate</code> breaks (expected behavior of current template)
  |At = {{
<code><nowiki>{{cite news/sandbox | title = Article | work = The News | date = 27 October 1920 | accessdate = 19 January 2008 | page = 22 }}</nowiki></code>
          #if: {{{journal|{{{periodical|{{{newspaper|{{{magazine|}}}}}}}}}}}}
* {{cite news/sandbox | title = Article | work = The News | date = 27 October 1920 | accessdate = 19 January 2008 | page = 22 }}
          |{{{pages|{{{page|{{{at|}}}}}}}}}
;Non-ISO can be used with <code>accessyear</code> parameter
          |{{
<code><nowiki>{{cite news/sandbox | title = Article | work = The News | date = 27 October 1920 | accessdate = 19 January | accessyear = 2008 | page = 22 }}</nowiki></code>
            #if: {{{page|{{{pages|}}}}}}
* {{cite news/sandbox | title = Article | work = The News | date = 27 October 1920 | accessdate = 19 January | accessyear = 2008 | page = 22 }}
            |{{{page|{{{pages}}}}}}
 
            |{{{at|}}}
== Unlinked retrieval dates ==
           
=== Current template ===
          }}
;No template options. Manual format works but is not desirable because it omits that date from the [[COinS]] metadata.
        }}
<code><nowiki>{{cite news | title = Article | work = The News | date = 27 October 1920 | page = 22 }} Retrieved 19 January 2008.</nowiki></code>
  |Series=[[News release|Press release]]
* {{cite news | title = Article | work = The News | date = 27 October 1920 | page = 22 }} Retrieved 19 January 2008.
  |language = {{{language|{{{in|}}}}}}
 
  |format = {{{format|}}}
=== Sandbox template ===
  |AccessDate={{{access-date|{{{accessdate|}}}}}}
Unlinked dates supported and included in COinS metadata:
  |DateFormat={{{dateformat|none}}}
;For unlinked dates:
  |quote = {{{quote|}}}
<code><nowiki>{{cite news/sandbox | title = Article | work = The News | date = 27 October 1920 | accessdaymonth = 19 January | accessyear = 2008 | page = 22 }}</nowiki></code>
  |Ref={{{ref|}}}
* {{cite news/sandbox | title = Article | work = The News | date = 27 October 1920 | accessdaymonth = 19 January | accessyear = 2008 | page = 22 }}
  |Sep = {{{separator|{{{seperator|.}}}}}}
<code><nowiki>{{cite news/sandbox | title = Article | work = The News | date = 27 October 1920 | accessmonthday = January 19 | accessyear = 2008 | page = 22 }}</nowiki></code>
  |PS={{#if:{{{quote|}}}||.}}
* {{cite news/sandbox | title = Article | work = The News | date = 27 October 1920 | accessmonthday = January 19 | accessyear = 2008 | page = 22 }}
  |Archive = {{
;Missing <code>accessyear</code> parameter does not break template.
              #if:{{{archiveurl|}}}|Archived from {{#if:{{{url|}}}|[{{{url|}}} the original]|the original}} {{#if:{{{archivedate|}}}| on {{{archivedate}}}|. You must specify the date the archive was made using the <code>archivedate=</code> parameter.{{#if: {{NAMESPACE}}|| [[Category:Articles with broken citations]]}}}}
<code><nowiki>{{cite news/sandbox | title = Article | work = The News | date = 27 October 1920 | accessdaymonth = 19 January | page = 22 }}</nowiki></code>
            }}
* {{cite news/sandbox | title = Article | work = The News | date = 27 October 1920 | accessdaymonth = 19 January | page = 22 }}
}}<noinclude>
<code><nowiki>{{cite news/sandbox | title = Article | work = The News | date = 27 October 1920 | accessmonthday = January 19 | page = 22 }}</nowiki></code>
{{pp-template|small=yes}}
* {{cite news/sandbox | title = Article | work = The News | date = 27 October 1920 | accessmonthday = January 19 | page = 22 }}
{{documentation}}
</noinclude>

Latest revision as of 14:55, 3 February 2009

Test cases to support changes to Template:Cite news from this version of Template:Cite news/sandbox

Linked retrieval dates

Current template

To display linked retrieval dates, must be in ISO format, or broken otherwise

{{cite news | title = Article | work = The News | date = 27 October 1920 | accessdate = 2008-01-19 | page = 22 }}

  • "Article". The News: p. 22. 27 October 1920. 
Broken for non-ISO format

{{cite news | title = Article | work = The News | date = 27 October 1920 | accessdate = 19 January 2008 | page = 22 }}

  • "Article". The News: p. 22. 27 October 1920. 

Sandbox template

Linked retrieval dates can use ISO format or add optional accessyear parameter

ISO format works as before

{{cite news/sandbox | title = Article | work = The News | date = 27 October 1920 | accessdate = 2008-01-19 | page = 22 }}

  • "Article". The News: p. 22. 27 October 1920 
Non-ISO format in accessdate breaks (expected behavior of current template)

{{cite news/sandbox | title = Article | work = The News | date = 27 October 1920 | accessdate = 19 January 2008 | page = 22 }}

  • "Article". The News: p. 22. 27 October 1920 
Non-ISO can be used with accessyear parameter

{{cite news/sandbox | title = Article | work = The News | date = 27 October 1920 | accessdate = 19 January | accessyear = 2008 | page = 22 }}

  • "Article". The News: p. 22. 27 October 1920 

Unlinked retrieval dates

Current template

No template options. Manual format works but is not desirable because it omits that date from the COinS metadata.

{{cite news | title = Article | work = The News | date = 27 October 1920 | page = 22 }} Retrieved 19 January 2008.

  • "Article". The News: p. 22. 27 October 1920.  Retrieved 19 January 2008.

Sandbox template

Unlinked dates supported and included in COinS metadata:

For unlinked dates

{{cite news/sandbox | title = Article | work = The News | date = 27 October 1920 | accessdaymonth = 19 January | accessyear = 2008 | page = 22 }}

  • "Article". The News: p. 22. 27 October 1920 

{{cite news/sandbox | title = Article | work = The News | date = 27 October 1920 | accessmonthday = January 19 | accessyear = 2008 | page = 22 }}

  • "Article". The News: p. 22. 27 October 1920 
Missing accessyear parameter does not break template.

{{cite news/sandbox | title = Article | work = The News | date = 27 October 1920 | accessdaymonth = 19 January | page = 22 }}

  • "Article". The News: p. 22. 27 October 1920 

{{cite news/sandbox | title = Article | work = The News | date = 27 October 1920 | accessmonthday = January 19 | page = 22 }}

  • "Article". The News: p. 22. 27 October 1920