模板:Time interval/testcases
外觀
這是Template:Time interval及其沙盒的測試樣例。刷新本頁以更新內容。 如果這裡有許多複雜的模板的用例,可能會因為MediaWiki的技術限制而出錯。 您還可以用Special:展開模板來測試模板的使用效果。 您可以通過以下連結測試本模板在不同外觀下的效果: |
測試 1
[編輯]{{Time interval|1 Jan 2001|March 4, 2002}}
{{Time interval|1 Jan 2001|March 4, 2002}}
→ 1年2個月又3天{{Time interval/sandbox|1 Jan 2001|March 4, 2002}}
→ 1年2個月又3天- Expected: 1 year, 2 months and 3 days
{{Time interval|1 Jan 2001|March 4, 2002|abbr=on}}
{{Time interval|1 Jan 2001|March 4, 2002|abbr=on}}
→ 1y2m零3d{{Time interval/sandbox|1 Jan 2001|March 4, 2002|abbr=on}}
→ 1y2m零3d- Expected: 1y 2m 3d
{{Time interval|B.C.E. 1 Feb 120|28 FEB 1900}}
{{Time interval|B.C.E. 1 Feb 120|28 FEB 1900}}
→ 2019年27天{{Time interval/sandbox|B.C.E. 1 Feb 120|28 FEB 1900}}
→ 2019年27天- Expected: 2019 years and 27 days
測試 2
[編輯]{{Time interval| 1958-06-07 | 2016-04-21}}
{{Time interval| 1958-06-07 | 2016-04-21}}
→ 57年10個月又14天{{Time interval/sandbox| 1958-06-07 | 2016-04-21}}
→ 57年10個月又14天- Expected: 57 years, 10 months and 14 days
{{Time interval| 1961 | 1989 }}
{{Time interval| 1961 | 1989 }}
→ 28年{{Time interval/sandbox| 1961 | 1989 }}
→ 28年- Expected: 28 years
{{Time interval| 1999-08-17 }}
{{Time interval| 1999-08-17 }}
→ 25年1個月又22天{{Time interval/sandbox| 1999-08-17 }}
→ 25年1個月又22天- Expected: 22 years and 14 days (as of 2021)
{{Time interval| 17 August 1999 }}
{{Time interval| 17 August 1999 }}
→ 25年1個月又22天{{Time interval/sandbox| 17 August 1999 }}
→ 25年1個月又22天- Expected: 22 years and 14 days (as of 2021)
{{Time interval| August 17, 1999 | disp=raw }}
{{Time interval| August 17, 1999 | disp=raw }}
→ 25 1 22{{Time interval/sandbox| August 17, 1999 | disp=raw }}
→ 25 1 22- Expected: 22 14 (as of 2021)
{{Time interval| 1958-06-07 | 2016-04-21 | disp=age}}
{{Time interval| 1958-06-07 | 2016-04-21 | disp=age}}
→ 57年{{Time interval/sandbox| 1958-06-07 | 2016-04-21 | disp=age}}
→ 57年- Expected: 57 years
{{Time interval| 1794-06-08 | 1795-03-16 }}
{{Time interval| 1794-06-08 | 1795-03-16 }}
→ 9個月8天{{Time interval/sandbox| 1794-06-08 | 1795-03-16 }}
→ 9個月8天- Expected: 9 months 8 days
{{Time interval| 2016-04-08 20:43 | 2016-05-11 18:31}}
{{Time interval| 2016-04-08 20:43 | 2016-05-11 18:31}}
→ 1個月2天{{Time interval/sandbox| 2016-04-08 20:43 | 2016-05-11 18:31}}
→ 1個月2天- Expected: 1 month and 2 days
{{Time interval| 2016-04-08 20:43 | 2016-05-11 18:31 | abbr=on }}
{{Time interval| 2016-04-08 20:43 | 2016-05-11 18:31 | abbr=on }}
→ 1m2d{{Time interval/sandbox| 2016-04-08 20:43 | 2016-05-11 18:31 | abbr=on }}
→ 1m2d- Expected: 1m 2d
{{Time interval| 2016-04-08 20:43 | 2016-05-11 18:31 | round=hours }}
{{Time interval| 2016-04-08 20:43 | 2016-05-11 18:31 | round=hours }}
→ 1個月2天又22小時{{Time interval/sandbox| 2016-04-08 20:43 | 2016-05-11 18:31 | round=hours }}
→ 1個月2天又22小時- Expected: 1 month, 2 days and 22 hours
{{Time interval| 2016-04-08 20:43 | 2016-05-11 18:31 | round=days }}
{{Time interval| 2016-04-08 20:43 | 2016-05-11 18:31 | round=days }}
→ 1個月3天{{Time interval/sandbox| 2016-04-08 20:43 | 2016-05-11 18:31 | round=days }}
→ 1個月3天- Expected: 1 month and 3 days
{{Time interval| 28 July 1914 | 11 November 1918 | round=weeks }}
{{Time interval| 28 July 1914 | 11 November 1918 | round=weeks }}
→ 4年3個月又2周{{Time interval/sandbox| 28 July 1914 | 11 November 1918 | round=weeks }}
→ 4年3個月又2周- Expected: 4 years, 3 months and 2 weeks
{{Time interval| 13 June 2001 | 14 July 2002 | round=days }}
{{Time interval| 13 June 2001 | 14 July 2002 | round=days }}
→ 1年1個月又1天{{Time interval/sandbox| 13 June 2001 | 14 July 2002 | round=days }}
→ 1年1個月又1天- Expected: 1 year, 1 month and 1 day