Template:AgeFull: Difference between revisions

From OniGalore
m (oh, there we go)
(+cat, more docs, linking to Age)
Line 71: Line 71:
}}</includeonly><noinclude>Copied from Wikipedia's [[wikipedia:Template:For year month day|For year month day]] template. The three parameters are "year", "month", and "day", all optional. Here's what happens if you supply a specific date:
}}</includeonly><noinclude>Copied from Wikipedia's [[wikipedia:Template:For year month day|For year month day]] template. The three parameters are "year", "month", and "day", all optional. Here's what happens if you supply a specific date:


"Oni is <nowiki>{{AgeFull|year=2001|month=1|day=27}}</nowiki> old"<br />
"Oni is <nowiki>{{AgeFull|year=2001|month=1|day=28}}</nowiki> old"<br />
yields<br />
yields<br />
Oni is {{AgeFull|year=2001|month=1|day=27}} old
Oni is {{AgeFull|year=2001|month=1|day=28}} old


whereas "Oni is <nowiki>{{AgeFull|year=2001|month=1}}</nowiki> old"<br />
whereas "Oni is <nowiki>{{AgeFull|year=2001|month=1}}</nowiki> old"<br />
yields<br />
yields<br />
Oni is {{AgeFull|year=2001|month=1}} old</noinclude>
Oni is {{AgeFull|year=2001|month=1}} old
 
and "Oni is <nowiki>{{AgeFull|year=2001}}</nowiki> old"<br />
yields<br />
Oni is {{AgeFull|year=2001}} old
 
If you're content with just getting an age in whole years and you don't want the equivocating ("this or that"), use the simpler template [[Template:Age]].
 
[[Category:Macro templates]]</noinclude>

Revision as of 15:53, 17 June 2013

Copied from Wikipedia's For year month day template. The three parameters are "year", "month", and "day", all optional. Here's what happens if you supply a specific date:

"Oni is {{AgeFull|year=2001|month=1|day=28}} old"
yields
Oni is 24 years and 30 days old

whereas "Oni is {{AgeFull|year=2001|month=1}} old"
yields
Oni is 24 years and 0 or 1 month old

and "Oni is {{AgeFull|year=2001}} old"
yields
Oni is 23 or 24 years old

If you're content with just getting an age in whole years and you don't want the equivocating ("this or that"), use the simpler template Template:Age.