模板:Start date and age
维基媒体模板 / 维基百科,自由的 encyclopedia
More information 参数, 必填? ...
参数 | 必填? | 描述 |
---|---|---|
yyyy | 是 | 四位数字,指示年份 |
mm | 否 | 1至12之间的数字,指示月份。如果是一位数,前面无所谓补0与否。 |
dd | 否 | 1至31之间的数字,指示日期。如果是一位数,前面无所谓补0与否。 |
br= | 否 | br设为yes时,日期和它距今天的时间之间换行;设为除了yes之外的任何值或不设置此参数时,将不强制换行。 |
p= | 否 | p设为yes时,日期距今天的时间使用括号显示。 |
Close
More information 代码, 结果 ...
代码 | 结果 |
---|---|
{{Start date and age|2010|10|02}} | 2010年10月2日,13年前(2010-10-02) |
{{Start date and age|2008|08|09}} | 2008年8月9日,16年前(2008-08-09) |
{{Start date and age|1999|07}} | 1999年7月,25年前(1999-07) |
{{Start date and age|2003}} | 2003年,21年前(2003) |
{{Start date and age|2009|9|9|br=yes}} | 2009年9月9日, 14年前(2009-09-09) |
{{Start date and age|2016|3|1|p=yes}} | 2016年3月1日(8年前)(2016-03-01) |
{{Start date and age|2016|3|1|p=yes|br=yes}} | 2016年3月1日 (8年前)(2016-03-01) |
Close
此模板被引用于约20,000个页面。 为了避免造成大规模的影响,所有对此模板的编辑应先于沙盒、测试样例或您的沙盒上测试。 测试后无误的版本可以一次性地加入此模板中,但是修改前请务必于讨论页发起讨论。 模板引用数量会自动更新。 |
使用说明
这个模版会传回日期和它距离今天的时间长度。
用法
代码
一般
{{Start date and age|yyyy|mm|dd}}
完整
{{Start date and age|yyyy|mm|dd|br=yes|p=yes}}
参数具体描述
例子
重定向
以下模板重定向于此:
{{Sda}}
{{Release date and age}}
{{Launch date and age}}
上述文档嵌入自Template:Start date and age/doc。 (编辑 | 历史) 编者可以在本模板的沙盒 (编辑 | 差异)和测试样例 (编辑)页面进行实验。 请在/doc子页面中添加分类。本模板的子页面。 |