Template:Year/doc: Difference between revisions
From Absit Omen Lexicon
mNo edit summary |
mNo edit summary |
||
Line 3: | Line 3: | ||
;Syntax | ;Syntax | ||
:<nowiki>{{Year|birthYear|birthmonth}}</nowiki> | :<nowiki>{{Year|birthYear|birthmonth}}</nowiki> | ||
:The Year template can also take a Hogwarts House specifier. g={{House|g}}, r={{House|r}}, h={{House|h}}, s={{House|s}}. Also d={{House|d}}, b={{House|b}}, w={{House|w}} | |||
::<nowiki>{{Year|birthYear|birthmonth|firstletterofhouse}}</nowiki> | |||
;Example | ;Example | ||
:<nowiki>{{Year|1997|8}}</nowiki> returns "{{Year|1997|8}}" | :<nowiki>{{Year|2000|8|g}}</nowiki> returns "{{Year|2000|8|g}}" {{Note}} Does not output anything if the age is not old enough to be a student or to have already graduated. | ||
:<nowiki>{{Year|1997|8|g}}</nowiki> returns "{{Year|1997|8|g}}" | |||
:<nowiki>{{Year|1997|9}}</nowiki> returns "{{Year|1997|9}}" | :<nowiki>{{Year|1997|9}}</nowiki> returns "{{Year|1997|9}}" | ||
:<nowiki>{{Year|1994|9}}</nowiki> returns "{{Year|1994|9}}" | :<nowiki>{{Year|1994|9}}</nowiki> returns "{{Year|1994|9}}" | ||
:<nowiki>{{Year|1990|06}}</nowiki> returns "{{Year|1990|06}}" | :<nowiki>{{Year|1990|06}}</nowiki> returns "{{Year|1990|06}}" | ||
:<nowiki>{{Year|1981|7}}</nowiki> returns "{{Year|1981|7}}" | :<nowiki>{{Year|1981|7|r}}</nowiki> returns "{{Year|1981|7|r}}" | ||
:<nowiki>{{Year|1960|11}}</nowiki> returns "{{Year|1960|11}}" | :<nowiki>{{Year|1960|11}}</nowiki> returns "{{Year|1960|11}}" | ||
{{Note|If using this to specify a category, must use the house/school specifier, and add 'cat' as a fourth value. <nowiki>{{Year|1981|7|r|cat}}</nowiki> Only use this for when you want the output to be a category tag because all it will out put are two categories, Year and House+Year}} | |||
The year template uses two subtemplates, [[Template:Year/calc]] and [[Template:Year/grad]], to do its calculations. | |||
<noinclude>[[Category:Template Documentation]]</noinclude> | <noinclude>[[Category:Template Documentation]]</noinclude> |
Revision as of 20:46, 15 October 2012
This template returns the current year of a student, or the year a non-student character graduated. It uses the Current Date Template to determine the current date. Enter the Birth year as the first value and the birth month as the second value.
- Syntax
- {{Year|birthYear|birthmonth}}
- The Year template can also take a Hogwarts House specifier. g=Gryffindor, r=Ravenclaw, h=Hufflepuff, s=Slytherin. Also d=Durmstrang Institute, b=Beauxbatons Academy, w=Salem Witches Institute
- {{Year|birthYear|birthmonth|firstletterofhouse}}
- Example
- {{Year|2000|8|g}} returns "Seventh Year Gryffindor"
Note: Does not output anything if the age is not old enough to be a student or to have already graduated.
- {{Year|1997|8|g}} returns "Gryffindor Graduate (Class of 2015)"
- {{Year|1997|9}} returns "Graduate (Class of 2016)"
- {{Year|1994|9}} returns "Graduate (Class of 2013)"
- {{Year|1990|06}} returns "Graduate (Class of 2008)"
- {{Year|1981|7|r}} returns "Ravenclaw Graduate (Class of 1999)"
- {{Year|1960|11}} returns "Graduate (Class of 1979)"
Note: If using this to specify a category, must use the house/school specifier, and add 'cat' as a fourth value. {{Year|1981|7|r|cat}} Only use this for when you want the output to be a category tag because all it will out put are two categories, Year and House+Year
The year template uses two subtemplates, Template:Year/calc and Template:Year/grad, to do its calculations.