Difference between revisions of "Template:Auc/data/doublet/doc"

From blackwiki
Jump to navigation Jump to search
imported>Grufo
imported>Grufo
(Remove the "main-" prefix from parameters)
Line 6: Line 6:
 
== Usage ==
 
== Usage ==
  
E.g. <code><nowiki>{{Auc/data/doublet|main-year=2773|main-era=AUC|equals-year=2020|equals-era=CE|abbr=off}}</nowiki></code> &rarr; {{Auc/data/doublet|main-year=2773|main-era=AUC|equals-year=2020|equals-era=CE|abbr=off}}
+
E.g. <code><nowiki>{{Auc/data/doublet|year=2773|era=AUC|equals-year=2020|equals-era=CE|abbr=off}}</nowiki></code> &rarr; {{Auc/data/doublet|year=2773|era=AUC|equals-year=2020|equals-era=CE|abbr=off}}
  
 
== Parameters ==
 
== Parameters ==
 
<templatedata>{
 
<templatedata>{
 
"params": {
 
"params": {
"main-year": {
+
"year": {
 
"label": "Main year",
 
"label": "Main year",
 
"description": "The main year that will be shown",
 
"description": "The main year that will be shown",
Line 17: Line 17:
 
"required": true
 
"required": true
 
},
 
},
"main-era": {
+
"era": {
 
"label": "Main era",
 
"label": "Main era",
 
"description": "The main abbreviated era",
 
"description": "The main abbreviated era",
Line 23: Line 23:
 
"type": "string",
 
"type": "string",
 
"required": true
 
"required": true
 +
},
 +
"page": {
 +
"label": "Main page",
 +
"description": "A Wikipedia article for the specific year; if specified it overrides the effects of the |links= parameter on the year",
 +
"type": "wiki-page-name"
 +
},
 +
"flip": {
 +
"label": "Main flip",
 +
"description": "Invert the order of year and era in the main part",
 +
"type": "boolean"
 
},
 
},
 
"equals-year": {
 
"equals-year": {
Line 34: Line 44:
 
"example": "CE / BCE / AD / BC / AUC / PUC",
 
"example": "CE / BCE / AD / BC / AUC / PUC",
 
"type": "string"
 
"type": "string"
 +
},
 +
"equals-page": {
 +
"label": "Equals page",
 +
"description": "A Wikipedia article for the specific year; if specified it overrides the effects of the |links= parameter on the year",
 +
"type": "wiki-page-name"
 +
},
 +
"equals-flip": {
 +
"label": "Equals flip",
 +
"description": "Invert the order of year and era in the equals part",
 +
"type": "boolean"
 
},
 
},
 
"abbr": {
 
"abbr": {
Line 53: Line 73:
 
"type": "string",
 
"type": "string",
 
"default": "b"
 
"default": "b"
},
 
"main-page": {
 
"label": "Main page",
 
"description": "A Wikipedia article for the specific year; if specified it overrides the effects of the |links= parameter on the year",
 
"type": "wiki-page-name"
 
},
 
"equals-page": {
 
"label": "Equals page",
 
"description": "A Wikipedia article for the specific year; if specified it overrides the effects of the |links= parameter on the year",
 
"type": "wiki-page-name"
 
},
 
"main-flip": {
 
"label": "Main flip",
 
"description": "Invert the order of year and era in the main part",
 
"type": "boolean"
 
},
 
"equals-flip": {
 
"label": "Equals flip",
 
"description": "Invert the order of year and era in the equals part",
 
"type": "boolean"
 
 
}
 
}
 
}
 
}

Revision as of 05:03, 4 October 2020

This is only a helper template of {{Auc}} that manages a pair of dates. It is not meant to be invoked directly by humans.

Usage

E.g. {{Auc/data/doublet|year=2773|era=AUC|equals-year=2020|equals-era=CE|abbr=off}} → 2773 Ab Urbe ConditaTemplate:Sp(2020 Common Era)

Parameters

No description.

Template parameters

ParameterDescriptionTypeStatus
Main yearyear

The main year that will be shown

Numberrequired
Main eraera

The main abbreviated era

Example
CE / BCE / AD / BC / AUC / PUC
Stringrequired
Main pagepage

A Wikipedia article for the specific year; if specified it overrides the effects of the |links= parameter on the year

Pageoptional
Main flipflip

Invert the order of year and era in the main part

Booleanoptional
Equals yearequals-year

The year the main year is equal to

Numberoptional
Equals eraequals-era

The era of the year the main year is equal to

Example
CE / BCE / AD / BC / AUC / PUC
Stringoptional
Equals pageequals-page

A Wikipedia article for the specific year; if specified it overrides the effects of the |links= parameter on the year

Pageoptional
Equals flipequals-flip

Invert the order of year and era in the equals part

Booleanoptional
Abbreviationsabbr

Use abbreviations

Stringoptional
Automatic linksalinks

Create internal links for the era

Default
on
Example
on / yes / true / off / no / false
Booleanoptional
Displaydisp

Display using a particular format

Default
b
Example
b / sqbr / equals / comma / or / note / alone / number
Stringoptional