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

From blackwiki
Jump to navigation Jump to search
imported>Grufo
imported>Grufo
(Document the new |flip parameter and further examples)
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:
 
== Usage ==
 
== Usage ==
 
E.g. <code><nowiki>{{Auc/data/year|2003|CE|abbr=off}}</nowiki></code> &rarr; {{Auc/data/year|2003|CE|abbr=off}}
 
E.g. <code><nowiki>{{Auc/data/year|2003|CE|abbr=off}}</nowiki></code> &rarr; {{Auc/data/year|2003|CE|abbr=off}}
 +
 +
E.g. <code><nowiki>{{Auc/data/year|258|AUC|alink=off|flip}}</nowiki></code> &rarr; {{Auc/data/year|258|AUC|flip}}
  
 
== Parameters ==
 
== Parameters ==
Line 21: Line 23:
 
"description": "The abbreviated era",
 
"description": "The abbreviated era",
 
"example": "CE / BCE / AD / BC / AUC / PUC",
 
"example": "CE / BCE / AD / BC / AUC / PUC",
"required": true
+
"required": true,
 +
"type": "string"
 +
},
 +
"3": {
 +
"label": "Flip",
 +
"description": "Invert the order of year and era",
 +
"type": "string",
 +
"example": "flip"
 
},
 
},
 
"abbr": {
 
"abbr": {
Line 30: Line 39:
 
"alink": {
 
"alink": {
 
"label": "Automatic link",
 
"label": "Automatic link",
"description": "Create internal links for the era",
+
"description": "Create internal link for the era",
 
"type": "boolean",
 
"type": "boolean",
"default": "true"
+
"default": "true",
 +
"example": "on / yes / true / off / no / false"
 
},
 
},
 
"page": {
 
"page": {

Latest revision as of 04:27, 4 October 2020

This is only a helper template of {{Auc}} that creates a year string.

Usage

E.g. {{Auc/data/year|2003|CE|abbr=off}} → 2003 Common Era

E.g. {{Auc/data/year|258|AUC|alink=off|flip}} → 258 AUC

Parameters

No description.

Template parameters

ParameterDescriptionTypeStatus
Year1

The year that will be shown

Numberrequired
Era2

The abbreviated era

Example
CE / BCE / AD / BC / AUC / PUC
Stringrequired
Flip3

Invert the order of year and era

Example
flip
Stringoptional
Abbreviationsabbr

Use abbreviation

Stringoptional
Automatic linkalink

Create internal link for the era

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

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

Pageoptional