Template:Year/doc: Difference between revisions
From Absit Omen Lexicon
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
This template returns the current year of a student, or the year a non-student character graduated. It uses the [[ | This template returns the current year of a student, or the year a non-student character graduated. It uses the [[Module:CurrentDate|Current Date Module]] to determine the current date. Enter the Birth year as the first value and the birth month as the second value. | ||
;Syntax | ;Syntax | ||
Line 9: | Line 9: | ||
;Example | ;Example | ||
:<nowiki>{{Year| | :<nowiki>{{Year|2006|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|8|g}}</nowiki> returns "{{Year|1997|8|g}}" | ||
:<nowiki>{{Year|1998|3}}</nowiki> returns "{{Year|1998|3}}" | :<nowiki>{{Year|1998|3}}</nowiki> returns "{{Year|1998|3}}" | ||
Line 17: | Line 17: | ||
:<nowiki>{{Year|1960|11}}</nowiki> returns "{{Year|1960|11}}" | :<nowiki>{{Year|1960|11}}</nowiki> returns "{{Year|1960|11}}" | ||
The year template invokes [[Module:Year]]. It also makes use of [[Module:Date]] and [[Module:CurrentDate]] to set the date by which the year is calculated. | |||
The year template | |||
<includeonly> | <includeonly> |
Revision as of 02:00, 16 July 2021
![]() |
This is a documentation subpage for Template:Year. It contains usage information, categories and other content that is not part of the original template page. |
This template returns the current year of a student, or the year a non-student character graduated. It uses the Current Date Module 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|2006|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|1998|3}} 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)"
The year template invokes Module:Year. It also makes use of Module:Date and Module:CurrentDate to set the date by which the year is calculated.