编辑“︁
Template:Date/doc
”︁(章节)
跳转到导航
跳转到搜索
Template:Editnotice load/content
警告:
您没有登录。如果您进行任何编辑,您的IP地址会公开展示。如果您
登录
或
创建账号
,您的编辑会以您的用户名署名,此外还有其他益处。
反垃圾检查。
不要
加入这个!
===注意事项=== ; <!-- Out-of-range values are "fixed" -->超出范围值会被“修正” *本模版所基于的[[PHP]]库会把超出范围值转换为最接近范围的值。所以,一些好像日期但实质不是日期的值也会被过度转换。这包括: <!-- * The [[PHP]] library that this template ultimately depends on converts out-of-range values to the next-best in-range values. As a result, some date-like values that are not actually valid dates get converted anyway. These include... --> **所有为0日的月份的日期。当写成“X月0日”之类的数据会被转化为上月的最后一天。<div>例如, <code><nowiki>{{date|June 0, 2006}}</nowiki></code> 的结果为 <code>{{date|June 0, 2006}}</code>。</div><div>相似的, <code><nowiki>{{date|0 January 2006}}</nowiki></code> 变成 <code>{{date|0 January 2006}}</code>.</div> <!-- ** all dates with zero day-of-the-month. Such a "zero-th" day of a month gets converted into the last day of the previous month.<div>For example, <code><nowiki>{{date|June 0, 2006}}</nowiki></code> results in <code>{{date|June 0, 2006}}</code>.</div><div>Similarly, <code><nowiki>{{date|0 January 2006}}</nowiki></code> becomes <code>{{date|0 January 2006}}</code>.</div> --> ** 所有天数超过当月天数的,将多出的天数往以后月份累加。<div>例如, <code><nowiki>{{date|31 November 2008}}</nowiki></code> 的结果为 <code>{{date|31 November 2008}}</code>, 因为11月只有30天。</div><div>相似的, <code><nowiki>{{date|February 29, 2007}}</nowiki></code> 的结果为<code>{{date|February 29, 2007}}</code>, 因为2007不是闰年。</div><div><small>注意: 由于PHP库解释器的特性, 'December 32' 和 '32 December' 是不同的, 和后一个是错误的 (这会令模板原样输出的), 只有前一个有效,并“正确累加”到下个月。</small></div> <!-- ** all dates with day-number values that exceed the number of days in the specified month cause the date to be incremented into the next month.<div>For example, <code><nowiki>{{date|31 November 2008}}</nowiki></code> results in <code>{{date|31 November 2008}}</code>, since November has only 30 days.</div><div>Similarly, <code><nowiki>{{date|February 29, 2007}}</nowiki></code> results in <code>{{date|February 29, 2007}}</code>, since 2007 was not a leap year.</div><div><small>Note: Due to a parser peculiarity in the PHP library, 'December 32' and '32 December' are treated differently, and the latter results in an error (which causes this template to emit it unchanged), and only the former "overflows" into the next month.</small></div> --> ; <!-- Non-Gregorian dates are treated as Gregorian -->非公历日期也会被视为公历日期 <!-- * The PHP library that this template ultimately depends on assumes that all dates, irrespective of context, are [[Gregorian calendar]] dates. Consequently,... --> *本模版所基于的[[PHP]]库会假定所有日期为[[公历]]日期,不理会上下说明,所以: **所有非公历日期会按上面的规则被变换,例如:<code><nowiki>{{date|30 February 1712}}</nowiki></code>的结果为<code>{{date|30 February 1712}}</code>因为虽然对于[[瑞典历]]来说1712年2月30日是合理的,但对于公历来说,2月最多只有29日的。 <!-- ** some dates that would be valid in a non-Gregorian context are treated as out-of-range dates and converted to the next-best in-range values. For example, <code><nowiki>{{date|30 February 1712}}</nowiki></code> results in <code>{{date|30 February 1712}}</code> because – even though 30 February 1712 is a valid date in the Swedish calendar – February 1712 had only 29 days in the Gregorian calendar.--> ** 10的倍数年的日期,如1000, 1100, 1300, 1400, 1500的2月29日和3月1日,也不能使用。原因同上。 <!-- ** ten dates are not reformatted. These are 29 February & 1 March of the years 1000, 1100, 1300, 1400, 1500. The cause of this is the same as that of the Swedish 30 February 1712. --> **部分不符合某些地区历法的日期也会被正确处理为公历日期,例如,对于俄历来说,1912年2月29日或1918年2月1日是不存在的,但对公历来说是存在的。 <!-- ** some dates that would not be valid in some contexts are converted normally. For example, 29 February 1912 or 1 February 1918 are not valid in a Russian context, but perfectly valid in the Gregorian one. --> ;<!-- ISO 8601 format not suitable for years before 1583 -->ISO 8601 格式标准不适用于1583年之前的年份 ISO 8601标准只规定1583年之后的日期标准,由于没有标准规定1583年之前的日期标准,不要在本模版使用该年份段的日期和任何不属于公历的日期。 <!-- The ISO 8601 standard requires mutual agreement between those using the format to use years earlier than 1583. Since no agreement has been obtained from our readers, that format should not be used for such years, nor for any date not in the Gregorian calendar. --> ; 不提供为[[微格式]] * [[hCalendar]] 和 [[hCard]] 两种微格式有各种各样本模版不能输出的功能。<!-- Use {{Tl|Start date}}, {{Tl|End date}}, {{Tl|Birth date}} or one of their variants, as necessary, in infoboxes which allow microformat-compatible date templates. -->如果,想在''infoboxes''模板内使用微格式日期模板的话,请使用{{Tl|Start date}}、{{Tl|End date}}或{{Tl|Birth date}}。 <includeonly>{{Sandbox other||<!-- 本行下加入模板的分類 --> [[Category:日期換算模板]] [[Category:日期计算模板]] }}</includeonly>
摘要:
请注意,所有对Local Chinese Wikipedia的贡献均可能会被其他贡献者编辑、修改或删除。如果您不希望您的文字作品被随意编辑,请不要在此提交。
您同时也向我们承诺,您提交的内容为您自己所创作,或是复制自公共领域或类似自由来源(详情请见
Project:著作权
)。
未经许可,请勿提交受著作权保护的作品!
取消
编辑帮助
(在新窗口中打开)
导航菜单
个人工具
未登录
讨论
贡献
创建账号
登录
命名空间
模板
讨论
大陆简体
不转换
简体
繁體
大陆简体
香港繁體
澳門繁體
大马简体
新加坡简体
臺灣正體
查看
阅读
编辑
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
工具
链入页面
相关更改
特殊页面
页面信息