Difference between revisions of "Template:Hcard-bday/doc"

From blackwiki
Jump to navigation Jump to search
imported>SMcCandlish
m (Rv. anon edit that appears to have completely missed the point, or was an editing experiment.)
Line 7: Line 7:
 
The template has five parameters:
 
The template has five parameters:
  
# name = Qaasim Asani Malik Middleton(becomes hCard's "fn" class).
+
# name = the person's name (becomes hCard's "fn" class).
# template type = "January 13, 1996" or "1/13/96" (emits data formatted in hCard's bday class; do not use the latter for dead people)
+
# template type = "birth date" or "birth date and age" (emits data formatted in hCard's bday class; do not use the latter for dead people)
# birth year = 1996
+
# birth year = four digits
# birth month = 01
+
# birth month = two digits
# birth day = 13
+
# birth day = two digits
  
 
==Copyable code==
 
==Copyable code==
Line 25: Line 25:
 
<pre><nowiki>
 
<pre><nowiki>
 
lorem {{hcard-bday
 
lorem {{hcard-bday
|Qaasim Asani Malik
+
|Tim Berners-Lee
|January 13, 1996 and he's 11 years old
+
|birth date and age
|1996
+
|1955
|01
+
|06
|13
+
|08
 
}} ipsum
 
}} ipsum
 
</nowiki></pre>
 
</nowiki></pre>

Revision as of 23:34, 1 August 2007

Purpose

This template creates an inline hCard microformat for a person, with their date of birth (and optionally age, if living), using either {{birth date}} or {{birth date and age}}.

For inline hCards for a building, organisation or place, see {{Hcard-geo}}).

Use

The template has five parameters:

  1. name = the person's name (becomes hCard's "fn" class).
  2. template type = "birth date" or "birth date and age" (emits data formatted in hCard's bday class; do not use the latter for dead people)
  3. birth year = four digits
  4. birth month = two digits
  5. birth day = two digits

Copyable code

Overwrite place-holder text; remove " and age" if subject is dead:

{{hcard-bday|PersonName|birth date and age|YYYY|MM|DD}}

Examples

Living

lorem {{hcard-bday
|Tim Berners-Lee
|birth date and age
|1955
|06
|08
}} ipsum

which may be written in one line, as:

lorem {{hcard-bday|Tim Berners-Lee|birth date and age|1955|06|08}} ipsum

gives:

lorem Tim Berners-Lee, b. (1955-06-08) June 8, 1955 (age 70) ipsum

Dead

For a dead eprson (or where age is simply not desired)

lorem {{hcard-bday
|Jimi Hendrix
|birth date
|1942
|11
|27
}} ipsum

gives:

lorem Jimi Hendrix, b. (1942-11-27)November 27, 1942 ipsum