This is an old revision of this page, as edited by RexxS(talk | contribs) at 21:45, 6 April 2018(copy testing from main module). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.Revision as of 21:45, 6 April 2018 by RexxS(talk | contribs)(copy testing from main module)
Some test cases for the function formatDate. Call like {{#invoke:WikidataIB/sandbox |formatDate | 1 August 30 BCE |bc=BCE |df=dmy}}
Input date: 1 August 30 BCE, 12:39:56
no parameters
1 August 30 BCE
bc=BC
1 August 30 BC
bc=BCE
1 August 30 BCE
bc=bc
1 August 30 BC
bc=bce
1 August 30 BCE
bc=XYZ
1 August 30 BCE
df=dmy
1 August 30 BCE
df=DMY
1 August 30 BCE
df=mdy
August 1, 30 BCE
df=MDY
August 1, 30 BCE
df=ABC
1 August 30 BCE
df=y
30 BCE
bc=BCE df=dmy
1 August 30 BCE
bc=BCE df=mdy
1 August 30 BCE
bc=BCE df=y
30 BCE
bc=BC df=dmy
1 August 30 BC
bc=BC df=mdy
August 1, 30 BC
bc=BC df=y
30 BC
Input date: 20 January 2017, 12:39:56
no parameters
20 January 2017
bc=BC
20 January 2017
bc=BCE
20 January 2017
bc=bc
20 January 2017
bc=bce
20 January 2017
bc=XYZ
20 January 2017
df=dmy
20 January 2017
df=DMY
20 January 2017
df=mdy
January 20, 2017
df=MDY
January 20, 2017
df=ABC
20 January 2017
df=y
2017
bc=BCE df=dmy
20 January 2017
bc=BCE df=mdy
20 January 2017
bc=BCE df=y
2017
bc=BC df=dmy
20 January 2017
bc=BC df=mdy
January 20, 2017
bc=BC df=y
2017
Some test cases for the function formatDate. Call like {{#invoke:WikidataIB/sandbox |formatDate | 1 August 30 BCE |bc=BCE |df=dmy}}
Input date: 1 August 30 BCE, 12:39:56
no parameters
1 August 30 BCE
bc=BC
1 August 30 BC
bc=BCE
1 August 30 BCE
bc=bc
1 August 30 BC
bc=bce
1 August 30 BCE
bc=XYZ
1 August 30 BCE
df=dmy
1 August 30 BCE
df=DMY
1 August 30 BCE
df=mdy
August 1, 30 BCE
df=MDY
August 1, 30 BCE
df=ABC
1 August 30 BCE
df=y
30 BCE
bc=BCE df=dmy
1 August 30 BCE
bc=BCE df=mdy
1 August 30 BCE
bc=BCE df=y
30 BCE
bc=BC df=dmy
1 August 30 BC
bc=BC df=mdy
August 1, 30 BC
bc=BC df=y
30 BC
Input date: 20 January 2017, 12:39:56
no parameters
20 January 2017
bc=BC
20 January 2017
bc=BCE
20 January 2017
bc=bc
20 January 2017
bc=bce
20 January 2017
bc=XYZ
20 January 2017
df=dmy
20 January 2017
df=DMY
20 January 2017
df=mdy
January 20, 2017
df=MDY
January 20, 2017
df=ABC
20 January 2017
df=y
2017
bc=BCE df=dmy
20 January 2017
bc=BCE df=mdy
20 January 2017
bc=BCE df=y
2017
bc=BC df=dmy
20 January 2017
bc=BC df=mdy
January 20, 2017
bc=BC df=y
2017
Calls to getValue for dates
Some calls to getValue that return dates:
In Marcus Antonius Creticus (Q357585): {{#invoke:WikidataIB/sandbox |getValue |qid=Q357585 |P569 |fetchwikidata=ALL |onlysourced=no}} -> 2nd century BC
In Mark Antony (Q51673): {{#invoke:WikidataIB/sandbox |getValue |qid=Q51673 |P569 |fetchwikidata=ALL |onlysourced=no}} -> 14 January 83 BC, 83 BC
In Mark Antony (Q51673): {{#invoke:WikidataIB/sandbox |getValue |qid=Q51673 |P569 |fetchwikidata=ALL |bc=BC |onlysourced=no}} -> 14 January 83 BC, 83 BC
In Mark Antony (Q51673): {{#invoke:WikidataIB/sandbox |getValue |qid=Q51673 |P569 |fetchwikidata=ALL |df=mdy |onlysourced=no}} -> January 14, 83 BC, 83 BC
In Mark Antony (Q51673): {{#invoke:WikidataIB/sandbox |getValue |qid=Q51673 |P569 |fetchwikidata=ALL |df=y |onlysourced=no}} -> 83 BC, 83 BC
In Richard Burton (Q151973): {{#invoke:WikidataIB/sandbox |getValue |qid=Q151973 |P569 |fetchwikidata=ALL}} -> 10 November 1925
In Richard Burton (Q151973): {{#invoke:WikidataIB/sandbox |getValue |qid=Q151973 |P569 |fetchwikidata=ALL |bc=BC}} -> 10 November 1925
In Richard Burton (Q151973): {{#invoke:WikidataIB/sandbox |getValue |qid=Q151973 |P569 |fetchwikidata=ALL |df=mdy}} -> November 10, 1925
In Richard Burton (Q151973): {{#invoke:WikidataIB/sandbox |getValue |qid=Q151973 |P569 |fetchwikidata=ALL |df=y}} -> 1925