Template:Categories by date/sandbox
{{{caption}}} in the 1st century.
[[Category:1st millennium {{{name}}}| 0]][[Category:{{{name}}} by century|01]][[:Category:1st millennium {{{name}}}|1st millennium {{{name}}}]]: |
|
This is the template sandbox page for Template:Categories by date (diff). See also the companion subpage for test cases. |
This template uses Lua: |
This template uses TemplateStyles: |
Usage
[edit]For editors
[edit]All templates using the system have identical usage. The output will change depending on what information you provide it:
- year categories: provide the century, decade, and year digits;
- decade categories: provide the century and decade digits;
- century categories: provide the century digit.
Examples:
Example
Example
Example
20th century:
{{births by year |century = 19 |decade = |year = }}
Authors who were born in the 20th century.
2nd millennium births: |
Example
Example
Example
Example
First century:
{{births by year |century = 0 |decade = |year = }}
Authors who were born in the 1st century.
1st millennium births: |
For coders
[edit]Note:
This template is not intended to be used directly by editors; if you are looking for documentation on a template like {{births by year}}, see For editors above. Currently, the following templates use this system:
- {{births by year}}
- {{deaths by year}}
- {{works by year}}
Usage
[edit]This template is used as part of specific templates like {{deaths by year}} to generate lists of dated categories (century, decades, years). It deduces the depth from how much information is provided. The code below is standard (change values as appropriate):
{{categories by date |century = {{{century|}}} |decade = {{{decade|}}} |year = {{{year|}}} |era = {{{era|}}} |bce = {{{bce|}}} |caption = Plays published |name = plays |supercatname = works |century-hyphen = true |supercat-century-hyphen = false }}
- century, decade, year: The date split into century, decade, and year digits.
- caption: The text used as part of the category description (for example, "{caption} in the year 1986").
- name: The text used in the categories (for example,
[[Category:1986 {name}]]
). - bce: set to
true
to add "BCE" to the category names. - era: set to
BCE
to add "BCE" to the category names. - supercatname: optional; use if there is a parent category that also categorizes by date.
- century-hyphen: optional; set to
true
if the century categories use a hyphen (for example,[[Category:10th-century plays]]
). - supercat-century-hyphen: optional; set to
true
if the century categories for the parent category use a hyphen (for example,[[Category:10th-century plays]]
).
See also
[edit]- {{categories by date}} (underlying template)
- {{births by year}}
- {{deaths by year}}
- {{works by year}}