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