模板:Age/testcases
这是Template:Age及其沙盒的测试样例。刷新本页以更新内容。 如果这里有许多复杂的模板的用例,可能会因为MediaWiki的技术限制而出错。 您还可以用Special:展开模板来测试模板的使用效果。 您可以通过以下链接测试本模板在不同皮肤下的效果: |
测试
编辑{{Age|1989|7|23|2003|7|14}}
{{Age|1989|7|23|2003|7|14}}
{{Age}} | {{Age/sandbox}} |
---|---|
13 | 13 |
{{Age|1989|7|0|2003|7|14}}
{{Age|1989|7|0|2003|7|14}}
{{Age}} | {{Age/sandbox}} |
---|---|
14 | 14 |
{{Age|1989|0|0|2003|7|14}}
{{Age|1989|0|0|2003|7|14}}
{{Age}} | {{Age/sandbox}} |
---|---|
14 | 14 |
{{Age|1989|7|23}}
{{Age|1989|7|23}}
→ <span class="currentage"></span>35{{Age/sandbox|1989|7|23}}
→ <span class="currentage"></span>35- Expected: 32 (as of 2021)
{{Age|23 July 1989|14 July 2003}}
{{Age|23 July 1989|14 July 2003}}
{{Age}} | {{Age/sandbox}} |
---|---|
13 | 13 |
{{Age|July 1989|2003}}
{{Age|July 1989|2003}}
{{Age}} | {{Age/sandbox}} |
---|---|
14 | 14 |
{{Age||-215|8|2}}
{{Age||-215|8|2}}
→ <strong class="error">错误:需要有效的年月日</strong>{{Age/sandbox||-215|8|2}}
→ <strong class="error">错误:需要有效的年月日</strong>- Expected: 2236 (as of 2021)
{{Age|August 2, 216 BCE}}
{{Age|August 2, 216 BCE}}
→ <span class="currentage"></span>2239{{Age/sandbox|August 2, 216 BCE}}
→ <span class="currentage"></span>2239- Expected: 2236 (as of 2021)
{{Age|format=commas|-215|8|2}}
{{Age|format=commas|-215|8|2}}
→ <span class="currentage"></span>2,239{{Age/sandbox|format=commas|-215|8|2}}
→ <span class="currentage"></span>2,239- Expected: 2,236 (as of 2021)
{{Age|format=cardinal|1970|1|1|1998|2|1}}
{{Age|format=cardinal|1970|1|1|1998|2|1}}
{{Age}} | {{Age/sandbox}} |
---|---|
twenty-eight | twenty-eight |
{{Age|1970|1|1|1998|2|1}}
{{Age|1970|1|1|1998|2|1}}
{{Age}} | {{Age/sandbox}} |
---|---|
28 | 28 |
{{Age|2010}}
{{Age|2010}}
→ <span class="currentage"></span>14{{Age/sandbox|2010}}
→ <span class="currentage"></span>14- Expected: 11 (as of 2021)
{{Age|format=raw|2010}}
{{Age|format=raw|2010}}
→ 14{{Age/sandbox|format=raw|2010}}
→ 14- Expected: 11 (as of 2021)