Template:YR: Difference between revisions
More actions
No edit summary Tag: Disambiguation links |
|||
| (7 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly> | <includeonly>{{#ifexpr: {{{1}}} < 100 or {{{1}}} = 0 | {{BCH|{{#expr:100 - {{{1}}}}}|format={{{format|bch_yr}}}}} | {{ACH|{{#expr:{{{1}}}-100}}}}}}</includeonly><noinclude> | ||
}}</includeonly><noinclude> | |||
=Documentation= | =Documentation= | ||
Allows for the conversion of YR dates established in ''{{RDM|Caprica}}'' to BCH (Before [[Fall of the Twelve Colonies|Colonial Holocaust]]) dates referenced previously, and linking these to redirects that point to specific timeline pages. | Allows for the conversion of YR dates established in ''{{RDM|Caprica}}'' to BCH (Before [[Fall of the Twelve Colonies|Colonial Holocaust]]) dates referenced previously, and linking these to redirects that point to specific timeline pages. | ||
This template automatically calculates ''Caprica'' YR dates to BCH event. A two digit YR date will result in BCH statements, while anything three digits or higher results will result in ACH dates. | This template automatically calculates ''Caprica'' YR dates to BCH event. A two digit YR date will result in BCH statements, while anything three digits or higher results will result in ACH dates. | ||
| Line 9: | Line 7: | ||
: ''Note that the epoch of the timeline, as established by ''Caprica''{{'|s}} writers, is {{BCH|0}}.'' | : ''Note that the epoch of the timeline, as established by ''Caprica''{{'|s}} writers, is {{BCH|0}}.'' | ||
== | ==Usage== | ||
To use this template, provide the YR date as the first parameter. You can optionally provide a format parameter to control the output order when converting to BCH. This format parameter is passed directly to the BCH template. | |||
===One to Two Digit Dates=== | * {{tlp|YR|40}} or {{tlp|YR|40|format=bch_yr}} will output: 60 BCH (40YR) (assuming BCH template default) | ||
* {{tlp|YR|40|3=format=yr_bch}} will output: 40YR (60 BCH) | |||
==Examples== | |||
===One to Two Digit Dates=== | |||
<pre>{{YR|40}}</pre> | <pre>{{YR|40}}</pre> | ||
| Line 17: | Line 21: | ||
Output: {{YR|40}} | Output: {{YR|40}} | ||
===Three Digit or Higher Dates=== | <pre>{{YR|40|format=yr_bch}}</pre> | ||
Output: {{YR|40|format=yr_bch}} | |||
===Three Digit or Higher Dates=== | |||
<pre>{{YR|101}}</pre> | <pre>{{YR|101}}</pre> | ||
| Line 23: | Line 31: | ||
Output: {{YR|101}} | Output: {{YR|101}} | ||
[[Category:Battlestar Wiki Templates]]</noinclude> | [[Category:Battlestar Wiki Templates]]<templatedata> | ||
{ | |||
"params": { | |||
"1": { | |||
"label": "YR", | |||
"description": "The YR number that allows translation into BCH or ACH.", | |||
"type": "number", | |||
"default": "40", | |||
"required": true | |||
}, | |||
"format": { | |||
"label": "Output Format", | |||
"description": "Specifies the output format for BCH conversion: 'bch_yr' for BCH (YR) or 'yr_bch' for YR (BCH). This parameter is passed to the BCH template.", | |||
"type": "string", | |||
"default": "bch_yr", | |||
"required": false, | |||
"suggestedvalues": ["bch_yr", "yr_bch"] | |||
} | |||
}, | |||
"description": "Creates and maintains links between YR and BCH/ACH calendar dates within the Re-imagined Series universe." | |||
} | |||
</templatedata></noinclude> | |||
Latest revision as of 04:58, 23 July 2025
Documentation
Allows for the conversion of YR dates established in Caprica to BCH (Before Colonial Holocaust) dates referenced previously, and linking these to redirects that point to specific timeline pages.
This template automatically calculates Caprica YR dates to BCH event. A two digit YR date will result in BCH statements, while anything three digits or higher results will result in ACH dates.
Usage
To use this template, provide the YR date as the first parameter. You can optionally provide a format parameter to control the output order when converting to BCH. This format parameter is passed directly to the BCH template.
- {{YR|40}} or {{YR|40}} will output: 60 BCH (40YR) (assuming BCH template default)
- {{YR|40|format=yr_bch}} will output: 40YR (60 BCH)
Examples
One to Two Digit Dates
{{YR|40}}
{{YR|40|format=yr_bch}}
Three Digit or Higher Dates
{{YR|101}}Creates and maintains links between YR and BCH/ACH calendar dates within the Re-imagined Series universe.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| YR | 1 | The YR number that allows translation into BCH or ACH.
| Number | required |
| Output Format | format | Specifies the output format for BCH conversion: 'bch_yr' for BCH (YR) or 'yr_bch' for YR (BCH). This parameter is passed to the BCH template.
| String | optional |