Template:From until
from until
[edit]
DocumentationIt has been suggested that this template should be merged with Template:Other date. (Discuss) |
This template allows to specify a date range in a format that is localizable.
Contents
Usage
{{From until|1=|2=|3=|4=|5=|6=|7=}}
Parameters
Parameter name | Description | Default value | required or optional?
|
---|---|---|---|
parameter #1 (1) | start year | empty | required |
parameter #2 (2) | start month | empty | optional |
parameter #3 (3) | start day | empty | optional |
parameter #4 (4) | end year | empty | required |
parameter #5 (5) | end month | empty | optional |
parameter #6 (6) | end day | empty | optional |
parameter #7 (7) | language code (only needs to be provided if the language shall be fixed and independent of the user's preferences) | value of {{int:Lang}} | optional |
Additional information
The template is intended to be used in the following namespaces: all namespaces
The template is intended to be used by the following user groups: all users
Relies on:
{{date}}, {{LangSwitch}}
See also
{{Lifetime date}}
Localization
To add your language to the list of languages supported by this template, please edit the template and add a row to the "{{LangSwitch|}}" construct. It takes the form "|xx=Your translation" (xx being the code of your language)
Notes
The template is similar to one of the options of Template:Other date, but causes a smaller expansion depth, thus avoiding the "expansion depth limit exceeded" error occurring on some pages transcluding that other template.
If parameters 2 and 3 are empty or undefined, parameter 1 can contain not just a year but any text, which is passed unchanged. It can for example be the call of another template that also provides localized text, e.g. Template:Circa. Similarly for parameters 4, 5 and 6.
Examples
Code | Output |
---|---|
{{from until|1999|||2000}} {{from until|1999|1||2000|2}} {{from until|1999|1|1|2000|2|1}} |
from until |