Template:Birth year and age/testcases

{{birth year and age/sandbox}}<!-- 沒有指定出生年份的話 -->

未指定年份

{{birth year and age/sandbox|1990}}<!-- 有出生年份但沒有月份 -->

1990年(33–34歲)

{{birth year and age/sandbox|1990|12}}

1990年12月(33歲)

{{birth year and age/sandbox|1978|demodate=2014-01-01}}<!-- 用作顯示範例時指定特定日期 -->

1978年(45–46歲)

{{birth year and age/sandbox|1978|demodate=1997/07/01}}<!-- 指定日期時改用斜線分隔年月日的話 -->

1978年(45–46歲)

{{birth year and age/sandbox|2004|9|demodate=2014-01}}<!-- 只指定年份和月份 -->

2004年9月(19歲)

{{birth year and age/sandbox|2004|9|demodate=1997/07/01}}<!-- 指定日期早於出生時間的話 -->

2004年9月(19歲)

{{birth year and age/sandbox|2004|9|demodate=19970701}}<!-- 又一種指定日期的格式 -->

2004年9月(19歲)

{{birth year and age/sandbox|1963|4|demodate=199707}}<!-- 不合格的日期格式 -->

2004年9月(19歲)