Jump to content

Template:Birth date and age/doc: Difference between revisions

+
(+)
Line 17: Line 17:
==== {{tl|dob}} is a redirect to {{tl|Birth date}} ====
==== {{tl|dob}} is a redirect to {{tl|Birth date}} ====


:<nowiki>{{dob|year of birth|month of birth|day of birth|additional parameters}}</nowiki>
:<code><nowiki>{{dob|year of birth|month of birth|day of birth|additional parameters}}</nowiki></code>


==== To display a birth date with calculated age ====
==== To display a birth date with calculated age ====


:<nowiki>{{Birth date and age|year of birth|month of birth|day of birth|additional parameters}}</nowiki>
:<code><nowiki>{{Birth date and age|year of birth|month of birth|day of birth|additional parameters}}</nowiki></code>


'''This form is only intended for living persons.''' In the rare case that a living person's birth date is given in a non-Gregorian calendar this template should not be used. The parameter names 'year', 'month', and 'day' can be used instead of the first, second, and third parameters for 'Birth date and age' only. These parameter names are not available for the 'Birth date' template.
'''This form is only intended for living persons.''' In the rare case that a living person's birth date is given in a non-Gregorian calendar this template should not be used. The parameter names 'year', 'month', and 'day' can be used instead of the first, second, and third parameters for 'Birth date and age' only. These parameter names are not available for the 'Birth date' template.
Line 27: Line 27:
==== {{tl|Bda}} is a redirect to {{tl|Birth date and age}} ====
==== {{tl|Bda}} is a redirect to {{tl|Birth date and age}} ====


:<nowiki>{{Bda|year of birth|month of birth|day of birth|additional parameters}}</nowiki>
:<code><nowiki>{{Bda|year of birth|month of birth|day of birth|additional parameters}}</nowiki></code>


Examples:
Examples:


:<nowiki>{{Birth date|1993|02|04|df=yes}}</nowiki> returns "{{Birth date|1993|02|04|df=yes}}"
:<code><nowiki>{{Birth date|1993|02|04|df=yes}}</nowiki></code> returns "{{Birth date|1993|02|04|df=yes}}"
:<nowiki>{{Birth date|1993|02|04|mf=yes}}</nowiki> returns "{{Birth date|1993|02|04|mf=yes}}"
:<code><nowiki>{{Birth date|1993|02|04|mf=yes}}</nowiki></code> returns "{{Birth date|1993|02|04|mf=yes}}"
:<nowiki>{{Birth date|1993|02|24|df=yes}}</nowiki> returns "{{Birth date|1993|02|24|df=yes}}"
:<code><nowiki>{{Birth date|1993|02|24|df=yes}}</nowiki></code> returns "{{Birth date|1993|02|24|df=yes}}"
:<nowiki>{{Birth date|1993|02|24|mf=yes}}</nowiki> returns "{{Birth date|1993|02|24|mf=yes}}"
:<code><nowiki>{{Birth date|1993|02|24|mf=yes}}</nowiki></code> returns "{{Birth date|1993|02|24|mf=yes}}"


:<nowiki>{{Birth date and age|1993|02|04|mf=yes}}</nowiki> returns {{Birth date and age|1993|02|04|mf=yes}}
:<code><nowiki>{{Birth date and age|1993|02|04|mf=yes}}</nowiki></code> returns {{Birth date and age|1993|02|04|mf=yes}}
:<nowiki>{{Birth date and age|1993|02|04|df=yes}}</nowiki> returns {{Birth date and age|1993|02|04|df=yes}}
:<code><nowiki>{{Birth date and age|1993|02|04|df=yes}}</nowiki></code> returns {{Birth date and age|1993|02|04|df=yes}}
:<nowiki>{{Birth date and age|1993|02|24|mf=yes}}</nowiki> returns {{Birth date and age|1993|02|24|mf=yes}}
:<code><nowiki>{{Birth date and age|1993|02|24|mf=yes}}</nowiki></code> returns {{Birth date and age|1993|02|24|mf=yes}}
:<nowiki>{{Birth date and age|1993|02|24|df=yes}}</nowiki> returns {{Birth date and age|1993|02|24|df=yes}}
:<code><nowiki>{{Birth date and age|1993|02|24|df=yes}}</nowiki></code> returns {{Birth date and age|1993|02|24|df=yes}}


=== Month First (mf) and Day First (df) options ===
=== Month First (mf) and Day First (df) options ===
Line 53: Line 53:
Examples:
Examples:


:<nowiki>{{Birth date|1993|02|24|df=yes}}</nowiki> displays "{{Birth date|1993|02|24|df=yes}}".
:<code><nowiki>{{Birth date|1993|02|24|df=yes}}</nowiki></code> displays "{{Birth date|1993|02|24|df=yes}}".


:<nowiki>{{Birth date and age|1993|02|24|df=yes}}</nowiki> displays "{{Birth date and age|1993|02|24|df=yes}}".
:<code><nowiki>{{Birth date and age|1993|02|24|df=yes}}</nowiki></code> displays "{{Birth date and age|1993|02|24|df=yes}}".


:<nowiki>{{Birth date|1993|02|24|mf=yes}}</nowiki> displays "{{Birth date|1993|02|24|mf=yes}}".
:<code><nowiki>{{Birth date|1993|02|24|mf=yes}}</nowiki></code> displays "{{Birth date|1993|02|24|mf=yes}}".


:<nowiki>{{Birth date and age|1993|02|24|mf=yes}}</nowiki> displays "{{Birth date and age|1993|02|24|mf=yes}}".
:<code><nowiki>{{Birth date and age|1993|02|24|mf=yes}}</nowiki></code> displays "{{Birth date and age|1993|02|24|mf=yes}}".


=== hCard microformat ===
=== hCard microformat ===
Line 65: Line 65:
The templates also returns the date, hidden by CSS, in the [[ISO 8601]] ''format'' (but not necessarily to the ISO 8601 ''standard'') needed by [[HCard|hCard microformat]]s. for example:
The templates also returns the date, hidden by CSS, in the [[ISO 8601]] ''format'' (but not necessarily to the ISO 8601 ''standard'') needed by [[HCard|hCard microformat]]s. for example:


:<nowiki>(<span class="bday">1993-02-24</span>)</nowiki>
:<code><nowiki>(<span class="bday">1993-02-24</span>)</nowiki></code>


Note: for the "foundation", "built" and similar set-up dates of companies, buildings, etc, use {{tl|Start date}} (this will work for year-only or month-year dates).
Note: for the "foundation", "built" and similar set-up dates of companies, buildings, etc, use {{tl|Start date}} (this will work for year-only or month-year dates).
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.