欢迎来到奇葩栖息地!欢迎加入Discord服务器:XfrfHCzfbW欢迎加入QQ频道:r01m9y3iz6请先至特殊:参数设置验证邮箱后再进行编辑。特殊:参数设置挑选自己想要使用的小工具!不会编辑?请至这里学习Wikitext语法。

模板:Gsd:修订间差异

来自奇葩栖息地
添加的内容 删除的内容
(// Edit via InPageEdit)
 
(// Edit via Wikiplus)
第2行: 第2行:
#ifexpr: {{{year|{{LOCALYEAR}}}}} < 1
#ifexpr: {{{year|{{LOCALYEAR}}}}} < 1
| {{error|无法处理公元1年1月1日之前的日期。}}
| {{error|无法处理公元1年1月1日之前的日期。}}
| {{#expr: floor({{
| {{#expr: floor(({{
#time: U | {{padleft:{{{year|{{LOCALYEAR}}}}}|4}}-{{{month|{{LOCALMONTH}}}}}-{{{day|{{LOCALDAY}}}}}
#time: U | {{padleft:{{{1|{{{year|{{LOCALYEAR}}}}}}}}|4}}-{{{2|{{{month|{{LOCALMONTH}}}}}}}}-{{{3|{{{day|{{LOCALDAY}}}}}}}}
}} / 86400<!-- # seconds in a day -->
}} + 28800<! CST (UTC+8) >
) / 86400<!-- # seconds in a day -->
) + 719163<!-- # days between 1-1-1 (GSD) and 1-1-1970 (Unix epoch) -->
) + 719163<!-- # days between 1-1-1 (GSD) and 1-1-1970 (Unix epoch) -->
}}
}}

2022年3月12日 (六) 15:58的版本

[查看 | 编辑 | 历史 | 清除缓存]文档页面
此模板及其文档搬运自中文Minecraft Wiki页面[[mcwzh:{{{page}}}|{{{page}}}]]。

这些内容依据CC BY-NC-SA 3.0协议引入。原贡献者请参见[{{fullurl:mcwzh:{{{page}}}|action=history}} 原页面的历史]。
经过双方编者的修改,这些内容与来源可能存在差异。
From interwiki:sync参数无效

This template outputs the Gregorian serial date, or the number of days since January 1, 1 A.D.

Usage

The parameters {{{year}}}, {{{month}}}, and {{{day}}} are the inputted date, each of which default to the current date.

This template does not allow years earlier than A.D. 1

Example

{{gsd}} produces "表达式错误:无法识别标点符号“!”。"

{{gsd|year=2015|month=1|day=1}} produces "表达式错误:无法识别标点符号“!”。"