Template:Age in years and days/testcases
This is the template test cases page for the sandbox of Template:Age in years and days. to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki; see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins and parsers with these links: |
Main vs sandbox
[edit]date 1 | date 2 | Template:Age in years and days (edit | talk | history | links | watch | logs) | Template:Age in years and days/sandbox (edit | talk | history | links | watch | logs) | ||||
---|---|---|---|---|---|---|---|
28 Feb 2002 | 1 Mar 2002 | 1 day | 1 day | ||||
2002 | 02 | 28 | 2002 | 03 | 01 | 1 day | 1 day |
28 Feb 2004 | 1 Mar 2004 | 2 days | 2 days | ||||
2004 | 02 | 28 | 2004 | 03 | 01 | 2 days | 2 days |
29 Feb 2004 | 1 Mar 2004 | 1 day | 1 day | ||||
2004 | 02 | 29 | 2004 | 03 | 01 | 1 day | 1 day |
28 Feb 2002 | 1 Mar 2004 | 2 years, 2 days | 2 years, 2 days | ||||
2002 | 02 | 28 | 2004 | 03 | 01 | 2 years, 2 days | 2 years, 2 days |
28 Feb 2004 | 1 Mar 2006 | 2 years, 1 day | 2 years, 1 day | ||||
2004 | 02 | 28 | 2006 | 03 | 01 | 2 years, 1 day | 2 years, 1 day |
29 Feb 2004 | 1 Mar 2006 | 2 years, 1 day | 2 years, 1 day | ||||
2004 | 02 | 29 | 2006 | 03 | 01 | 2 years, 1 day | 2 years, 1 day |
1 Mar 2002 | 28 Feb 2006 | 3 years, 364 days | 3 years, 364 days | ||||
2002 | 03 | 01 | 2006 | 02 | 28 | 3 years, 364 days | 3 years, 364 days |
1 Mar 2002 | 28 Feb 2004 | 1 year, 364 days | 1 year, 364 days | ||||
2002 | 03 | 01 | 2004 | 02 | 28 | 1 year, 364 days | 1 year, 364 days |
1 Mar 2002 | 29 Feb 2004 | 1 year, 365 days | 1 year, 365 days | ||||
2002 | 03 | 01 | 2004 | 02 | 29 | 1 year, 365 days | 1 year, 365 days |
1 Mar 2004 | 28 Feb 2006 | 1 year, 364 days | 1 year, 364 days | ||||
2004 | 03 | 01 | 2006 | 02 | 28 | 1 year, 364 days | 1 year, 364 days |
1 Mar 2004 | 28 Feb 2008 | 3 years, 364 days | 3 years, 364 days | ||||
2004 | 03 | 01 | 2008 | 02 | 28 | 3 years, 364 days | 3 years, 364 days |
1 Mar 2004 | 29 Feb 2008 | 3 years, 365 days | 3 years, 365 days | ||||
2004 | 03 | 01 | 2008 | 02 | 29 | 3 years, 365 days | 3 years, 365 days |
1 Mar 2004 | 28 Feb 2002 | −2 years, 2 days | −2 years, 2 days | ||||
2004 | 03 | 01 | 2002 | 02 | 28 | −2 years, 2 days | −2 years, 2 days |
1 Jan 2002 | 18 Feb 2002 | 48 days | 48 days | ||||
2002 | 01 | 01 | 2002 | 02 | 18 | 48 days | 48 days |
1 Jan 2002 | 18 Feb 2004 | 2 years, 48 days | 2 years, 48 days | ||||
2002 | 01 | 01 | 2004 | 02 | 18 | 2 years, 48 days | 2 years, 48 days |
1 Jan 2004 | 18 Feb 2004 | 48 days | 48 days | ||||
2004 | 01 | 01 | 2004 | 02 | 18 | 48 days | 48 days |
1 Jan 2004 | 18 Feb 2006 | 2 years, 48 days | 2 years, 48 days | ||||
2004 | 01 | 01 | 2006 | 02 | 18 | 2 years, 48 days | 2 years, 48 days |
1 Oct 2002 | 18 Nov 2002 | 48 days | 48 days | ||||
2002 | 10 | 01 | 2002 | 11 | 18 | 48 days | 48 days |
1 Oct 2002 | 18 Nov 2004 | 2 years, 48 days | 2 years, 48 days | ||||
2002 | 10 | 01 | 2004 | 11 | 18 | 2 years, 48 days | 2 years, 48 days |
1 Oct 2004 | 18 Nov 2004 | 48 days | 48 days | ||||
2004 | 10 | 01 | 2004 | 11 | 18 | 48 days | 48 days |
1 Oct 2004 | 18 Nov 2006 | 2 years, 48 days | 2 years, 48 days | ||||
2004 | 10 | 01 | 2006 | 11 | 18 | 2 years, 48 days | 2 years, 48 days |
1 Aug 2002 | 18 May 2003 | 290 days | 290 days | ||||
2002 | 08 | 01 | 2003 | 05 | 18 | 290 days | 290 days |
1 Aug 2002 | 18 May 2005 | 2 years, 290 days | 2 years, 290 days | ||||
2002 | 08 | 01 | 2005 | 05 | 18 | 2 years, 290 days | 2 years, 290 days |
1 Aug 2004 | 18 May 2005 | 290 days | 290 days | ||||
2004 | 08 | 01 | 2005 | 05 | 18 | 290 days | 290 days |
1 Aug 2004 | 18 May 2007 | 2 years, 290 days | 2 years, 290 days | ||||
2004 | 08 | 01 | 2007 | 05 | 18 | 2 years, 290 days | 2 years, 290 days |
20 May 1901 | 30 Oct 1907 | 6 years, 163 days | 6 years, 163 days | ||||
1901 | 05 | 20 | 1907 | 10 | 30 | 6 years, 163 days | 6 years, 163 days |
30 Oct 1907 | 27 Oct 1915 | 7 years, 362 days | 7 years, 362 days | ||||
1907 | 10 | 30 | 1915 | 10 | 27 | 7 years, 362 days | 7 years, 362 days |
27 Oct 1915 | 14 Nov 1916 | 1 year, 18 days | 1 year, 18 days | ||||
1915 | 10 | 27 | 1916 | 11 | 14 | 1 year, 18 days | 1 year, 18 days |
14 Nov 1916 | 10 Jan 1922 | 5 years, 57 days | 5 years, 57 days | ||||
1916 | 11 | 14 | 1922 | 01 | 10 | 5 years, 57 days | 5 years, 57 days |
16 May 1922 | 29 Mar 1928 | 5 years, 318 days | 5 years, 318 days | ||||
1922 | 05 | 16 | 1928 | 03 | 29 | 5 years, 318 days | 5 years, 318 days |
26 May 1928 | 1 Oct 1935 | 7 years, 128 days | 7 years, 128 days | ||||
1928 | 05 | 26 | 1935 | 10 | 01 | 7 years, 128 days | 7 years, 128 days |
1 Oct 1935 | 5 Jul 1945 | 9 years, 277 days | 9 years, 277 days | ||||
1935 | 10 | 01 | 1945 | 07 | 05 | 9 years, 277 days | 9 years, 277 days |
13 Jul 1945 | 13 Jun 1951 | 5 years, 335 days | 5 years, 335 days | ||||
1945 | 07 | 13 | 1951 | 06 | 13 | 5 years, 335 days | 5 years, 335 days |
13 Jun 1951 | 9 Feb 1960 | 8 years, 241 days | 8 years, 241 days | ||||
1951 | 06 | 13 | 1960 | 02 | 09 | 8 years, 241 days | 8 years, 241 days |
7 Mar 1960 | 8 Feb 1967 | 6 years, 338 days | 6 years, 338 days | ||||
1960 | 03 | 07 | 1967 | 02 | 08 | 6 years, 338 days | 6 years, 338 days |
9 Feb 1967 | 22 Dec 1977 | 10 years, 316 days | 10 years, 316 days | ||||
1967 | 02 | 09 | 1977 | 12 | 22 | 10 years, 316 days | 10 years, 316 days |
22 Dec 1977 | 3 Feb 1983 | 5 years, 43 days | 5 years, 43 days | ||||
1977 | 12 | 22 | 1983 | 02 | 03 | 5 years, 43 days | 5 years, 43 days |
3 Feb 1983 | 20 Dec 1991 | 8 years, 320 days | 8 years, 320 days | ||||
1983 | 02 | 03 | 1991 | 12 | 20 | 8 years, 320 days | 8 years, 320 days |
20 Dec 1991 | 11 Mar 1996 | 4 years, 82 days | 4 years, 82 days | ||||
1991 | 12 | 20 | 1996 | 03 | 11 | 4 years, 82 days | 4 years, 82 days |
19 Mar 1996 | 22 Nov 2001 | 5 years, 248 days | 5 years, 248 days | ||||
1996 | 03 | 19 | 2001 | 11 | 22 | 5 years, 248 days | 5 years, 248 days |
22 Nov 2001 | 2 Dec 2003 | 2 years, 10 days | 2 years, 10 days | ||||
2001 | 11 | 22 | 2003 | 12 | 02 | 2 years, 10 days | 2 years, 10 days |
2 Dec 2003 | 28 Jan 2005 | 1 year, 57 days | 1 year, 57 days | ||||
2003 | 12 | 02 | 2005 | 01 | 28 | 1 year, 57 days | 1 year, 57 days |
28 Jan 2005 | 4 Dec 2006 | 1 year, 310 days | 1 year, 310 days | ||||
2005 | 01 | 28 | 2006 | 12 | 04 | 1 year, 310 days | 1 year, 310 days |
4 Dec 2006 | 24 Jun 2010 | 3 years, 202 days | 3 years, 202 days | ||||
2006 | 12 | 04 | 2010 | 06 | 24 | 3 years, 202 days | 3 years, 202 days |
24 Jun 2010 | 26 Jun 2013 | 3 years, 2 days | 3 years, 2 days | ||||
2010 | 06 | 24 | 2013 | 06 | 26 | 3 years, 2 days | 3 years, 2 days |
26 Jun 2013 | 13 Sep 2013 | 79 days | 79 days | ||||
2013 | 06 | 26 | 2013 | 09 | 13 | 79 days | 79 days |
13 Oct 2013 | 11 years, 22 days | 11 years, 22 days | |||||
2013 | 10 | 13 | 11 years, 22 days | 11 years, 22 days | |||
0 days | 0 days | ||||||
0 days | 0 days |
Main template
[edit]Two fixed dates: 1 year, 29 days
Fixed date-today: 19 years, 277 days
Leap year test
[edit]No leap year (1900): 1 day
No leap year (1901): 1 day
Yes leap year (1904): 2 days
Single-plural test
[edit]Single year and day: 1 year, 1 day
Plural year and day: 2 years, 2 days
Single year and day over a leap day: 1 year, 1 day
Plural year and day over a leap day: 2 years, 2 days
Single year and day over new years: 1 year, 1 day
Plural year and day over new years: 2 years, 2 days
Sandbox template
[edit]Two fixed dates: 1 year, 29 days
Fixed date-today: 19 years, 277 days
Leap year test
[edit]No leap year (1900): 1 day
No leap year (1901): 1 day
Yes leap year (1904): 2 days
Single-plural test
[edit]Single year and day: 1 year, 1 day
Plural year and day: 2 years, 2 days
Single year and day over a leap day: 1 year, 1 day
Plural year and day over a leap day: 2 years, 2 days
Single year and day over new years: 1 year, 1 day
Plural year and day over new years: 2 years, 2 days
Output with "table=bda"
[edit]Rank | President | Date of Birth | Date of Death | Date of Birth (2) | Date of Death (2) | Longevity (Years,/Days) |
---|---|---|---|---|---|---|
1 | Hans Schaffner | 16 December 1908 | 26 November 2004 | 95 years, 346 days | ||
2 | Max Petitpierre | 26 February 1899 | 25 March 1994 | 95 years, 27 days | ||
3 | Pierre Graber | 6 December 1908 | 19 July 2003 | 94 years, 225 days | ||
4 | Enrico Celio | 19 June 1889 | 23 February 1980 | 90 years, 249 days | ||
5 | Hans-Peter Tschudi | 22 October 1913 | 30 September 2002 | 88 years, 343 days | ||
5 | Hans-Peter Tschudi | 22 October 1913 | Living | 111 years, 13 days |