Template:End date and age
模板文档
該模板用於顯示某事物結束的日期。
用法编辑
- 一般用法
{{End date and age|yyyy|mm|dd}}
- 2010年3月25日
{{End date and age|yyyy|mm|dd|df=yes}}
- 2010年3月25日
- 完整語法
{{End date and age|yyyy|mm|dd|df=yes|p=yes|br=yes}}
- 2010年3月25日
參數编辑
參數 | 必填? | 描述 |
---|---|---|
1 | 是 | 表示年份的四位數。 |
2 | 是 | 1到12之間的數字,表示月份(首位的0會被忽略)。 |
3 | 是 | 1到31之間的數字,表示該月的日期(首位的0會被忽略)。 |
df= | 否 | 若參數df為yes,y,或1,日期將以DMY形式顯示:4 March 2010,否則顯示為MDY形式:March 4, 2010. |
p= paren= | 否 | 若參數p或 paren為yes,y,或1,日期與距今天的時間以括號分隔,否則以分號和零寬空格分隔。 |
br= | 否 | 若參數br為yes,y,或1,日期與距今天的時間之間會有換行符,否則為零寬空格。 |
MDY與DMY编辑
此模板默認MDY。如果選擇默認格式,則參數df的值可以為no、n或0(如df=no)。MDY格式也可通過設置mf參數來實現(如mf=yes),不要在同一個模板中同時指定"df"和"mf"參數。
範例编辑
默認分隔符號:分號编辑
Syntax | Result |
---|---|
Full date (year, month, day) | |
{{End date and age|2010|01|02}} | 2010年1月2日 |
{{End date and age|2008|Jan|09|df=no}} | 2008年1月9日 |
{{End date and age|2003|January|05|mf=yes}} | 2003年1月5日 |
{{End date and age|2010|1|2|df=yes}} | 2010年1月2日 |
{{End date and age|2008|Jan|9|df=y}} | 2008年1月9日 |
{{End date and age|2003|January|5|df=1}} | 2003年1月5日 |
100 days ago:{{End date and age|2024|2|11}} | 2024年2月11日 |
Yesterday:{{End date and age|2024|5|20}} | 2024年5月20日 |
Today:{{End date and age|2024|5|21}} | 2024年5月21日 |
Year and month | |
{{End date and age|2001|9}} | 2001年9月 |
{{End date and age|2002|09}} | 2002年9月 |
{{End date and age|2003|Sep}} | 2003年9月 |
{{End date and age|2004|September}} | 2004年9月 |
Year only | |
{{End date and age|2005}} | 2005年 |
其他分隔符號:括號编辑
Syntax | Result |
---|---|
Full date (year, month, day) | |
{{End date and age|2003|02|15|p=yes}} | 2003年2月15日 |
{{End date and age|2003|02|15|df=y|p=y}} | 2003年2月15日 |
Year and month | |
{{End date and age|2003|02|p=1}} | 2003年2月 |
Year only | |
{{End date and age|2003|paren=yes}} | 2003年 |
換行符與分號编辑
Syntax | Result |
---|---|
Full date (year, month, day) | |
{{End date and age|2003|02|15|br=yes}} | 2003年2月15日 |
{{End date and age|2003|02|15|df=y|br=y}} | 2003年2月15日 |
Year and month | |
{{End date and age|2003|02|br=1}} | 2003年2月 |
Year only | |
{{End date and age|2003|br=yes}} | 2003年 |
換行符與括號编辑
Syntax | Result |
---|---|
Full date (year, month, day) | |
{{End date and age|2003|02|15|p=yes|br=yes}} | 2003年2月15日 |
{{End date and age|2003|02|15|df=y|p=y|br=y}} | 2003年2月15日 |
Year and month | |
{{End date and age|2003|02|p=1|br=1}} | 2003年2月 |
Year only | |
{{End date and age|2003|paren=yes|br=yes}} | 2003年 |
用於微格式编辑
該模板以hCalendar的形式返回日期(class="dtend")。如:
- (<span class="dtend">1993-02-24T08:30</span>)
詳情請參閱WikiProject:微格式。
範例编辑
{{End date and age|2015|12|31}}
→ 2015年12月31日2015年12月31日<span class="noprint">,​8年前</span><span style="display:none">​(<span class="dtend">2015-12-31</span>)</span>
參見编辑
- {{End date}}
- {{Time ago}} and {{Years or months ago}}
- {{Age}}
|
TemplateData编辑
VisualEditor與其他工具使用的TemplateData文檔 | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
End date and age模板数据 該模板用於顯示某事物結束的日期。
|
🔥 Top keywords: Baike: 首页Special:搜索毛泽东家族榮耀之繼承者天之驕女鐵拳英雄九龍城寨之圍城黃循財背着善宰跑篠崎泫妮妃雅新生 (网络剧)劉偉健斯洛伐克习近平劉俊謙 (香港)李显龙歌手2024佛誕淚之女王2024年泰國羽球公開賽新加坡總理邊佑錫新加坡Energy (組合)庆余年九龍寨城六四事件家族榮耀金智媛彌助菲律宾胖猫跳江事件劉寶傑DAY6林峯張文傑李光耀神耆小子張鳳妮黃世聰Seventeen (組合)维基百科願榮光歸香港中華民國鬼滅之刃 柱訓練篇2024年英雄联盟季中邀请赛中华人民共和国TripleS金秀賢 (男演員)罗伯特·菲佐井柏然2024年世界女排联赛黃偉哲怪獸8號佘詩曼Foodpanda金惠奫新加坡总统香緹·摩爾于北辰 (1968年)王嘉爾笑看風雲排球少年!!角色列表林飛帆郭葦昀馴鹿寶貝翁靜晶猩球崛起:王國誕生ILLIT尼古拉·約基奇春色寄情人周殷廷鬼滅之刃排球少年!!吳釗燮逆天奇案2不夠善良的我們BABYMONSTER李正皓尚达曼BOYNEXTDOOR胡子彤IVE (組合)陳靜 (香港)香港吴作栋黃道十二宮凡希亚·奥伊亚胡宇威長洲太平清醮張員瑛搜查班長1958伍允龍习明泽黄岩岛賴清德偶然遇見的你虽然不是英雄