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

From blackwiki
Jump to navigation Jump to search
imported>Grufo
m
imported>Grufo
(Add support for the |swap parameter)
Line 1: Line 1:
<includeonly>{{#switch:{{{2|}}}|ad|auc|puc={{#if:{{{page|}}}|[[{{{page}}}|{{auc/data/abbr|{{{2|}}}|abbr={{{abbr|}}}|alink=off}}{{sp}}{{{1|}}}]]|{{auc/data/abbr|{{{2|}}}|abbr={{{abbr|}}}|alink={{{alink|}}}}}{{sp}}{{{1|}}}}}|{{#if:{{{page|}}}|[[{{{page}}}|{{{1|}}}{{sp}}{{auc/data/abbr|{{{2|}}}|abbr={{{abbr|}}}|alink=off}}]]|{{{1|}}}{{sp}}{{auc/data/abbr|{{{2|}}}|abbr={{{abbr|}}}|alink={{{alink|}}}}}}}}}</includeonly><noinclude>{{documentation}}</noinclude>
+
<includeonly>{{#switch:{{{3|}}}{{{2|}}}|ad|auc|puc|swapce|swapbce|swapbc={{#if:{{{page|}}}|[[{{{page}}}|{{auc/data/abbr|{{{2|}}}|abbr={{{abbr|}}}|alink=off}}{{nbsp}}{{{1|}}}]]|{{auc/data/abbr|{{{2|}}}|abbr={{{abbr|}}}|alink={{{alink|}}}}}{{nbsp}}{{{1|}}}}}|{{#if:{{{page|}}}|[[{{{page}}}|{{{1|}}}{{nbsp}}{{auc/data/abbr|{{{2|}}}|abbr={{{abbr|}}}|alink=off}}]]|{{{1|}}}{{nbsp}}{{auc/data/abbr|{{{2|}}}|abbr={{{abbr|}}}|alink={{{alink|}}}}}}}}}</includeonly><noinclude>{{documentation}}</noinclude>

Revision as of 03:52, 4 October 2020

Template documentation[view] [edit] [history] [purge]

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