Template:Other date
更多操作
(本说明文件的该部分只有有限数量的语言版本。)
This template allows translation (localization) of many non-trivial phrases related to date description. This template has similar but more limited capabilities than {{Complex date}}. Please use {{Complex date}} instead of nesting {{Other date}} templates (calling {{Other date}} with inputs being other {{Other date}} templates).
本模板自动设置以下分类:
- Category:Pages using Complex date template with incorrect parameter (when errors are detected)
- Category:Unknown date (when dates are unknown, see also Template:Unknown)
- Category:Pages using Other date template with era
用法
{{Other date |1= |2= }}
模板参数
| 参数 | 描述 | 默认值 | 状态 | |
|---|---|---|---|---|
1 | type | Type of date notation. See examples below for list of allowed options. Pages using incorrect option will be added to Category:Pages using Complex date template with incorrect parameter. | empty | 必需 |
2 | date 1 | A date in ISO 8601 format "YYYY-MM-DD", or "YYYY-MM", or "YYYY", e.g. "2006-01-15" for "15 January 2006" or a number for centuries and millennia. | empty | 必需 |
3 | date 2 | Depends on type. If used than it is a date in ISO 8601 format. See Parameter #2 for details. | empty | 可选 |
era | era |
| empty | 可选 |
certainty | certainty | Certainty of the statement. Supported values: possibly, probably, presumably and circa ("circa" can be also used as adjective). This parameter was added to allow compatibility with Wikidata's sourcing circumstances qualifier when used to describe a date. | empty | 可选 |
lang | language | Language code (only needs to be provided if the language shall be fixed and independent of the user's preferences) | (language code of the user language) | 可选 |
|
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard. Existing template documentation Newly created template documentation and imports Wikipedia's help about TemplateData • Commons-specific information This template allows translation (localization) of many non-trivial phrases related to date description. This template has similar but more limited capabilities than {{Complex date}}. Please use {{Complex date}} instead of nesting {{Other date}} templates (calling {{Other date}} with inputs being other {{Other date}} templates).
| |||||||||||||||||||||||||||||||||||
附加信息
本模板可以用于以下名字空间: 所有名字空间
本模板可以被以下用户组使用: 所有用户
使用的模板:
另见
(本说明文件的该部分只有有限数量的语言版本。)
== 本地化 ==
(本说明文件的该部分只有有限数量的语言版本。)
Please note that phrases without translations into desired language will be shown in English using red font, to add translations please request an edit to Module:I18n/complex date
Examples
date notations with two dates
| {{{1}}} parameter | Example Code | Output |
|---|---|---|
-
|
{{other date|-|1999|2000}} {{other date|-|1999-01|2000-02}} {{other date|-|1999-01-01|2000-02-01}} |
从1999年到2000年 |
?
|
{{other date|?|1800|1825}} |
未知日期[1] |
between
|
{{other date|between|1999|2000}} {{other date|between|1999-02|2000-03}} {{other date|between|1999-02-01|2000-03-01}} |
在1999年到2000年之间 |
~
|
{{other date|~|1999|2000}} {{other date|ca|1999-05|2000-06}} {{other date|circa|1999-05-01|2000-06-1}} |
约1999年~2000年间 |
or
|
{{other date|or|1999|2000}} {{other date|or|1999-06|2000-07}} {{other date|or|1999-06-01|2000-07-1}} |
1999年或2000年 |
and
|
{{other date|&|1999|2000}} {{other date|and|1999-06|2000-07}} {{other date|and|1999-06-01|2000-07-01}} |
1999年和2000年 |
Julian
|
{{other date|Julian|1865-01-19|1865-01-07}} |
1865年1月19日(格里历1865年1月7日) |
Islamic
|
{{other date|islamic|1486|892}} {{other date|islamic|1486}} |
公元1486年 (伊斯兰历892年) 公元1486年 (伊斯兰历891年) |
era parameter
|
{{other date|or|985|986|era=BC}} |
公元前985年或986年 |
date notations with single date
Date notations with single date can use the second date for era, like BC or AD.
| {{{1}}} parameter | Example Code | Output | Example Code with era | Output with era |
|---|---|---|---|---|
<
|
{{other date|<|2000}} {{other date|b|2000-03}} {{other date|before|2000-03-01}} |
在2000年之前 在2000年3月之前 在2000年3月1日之前 |
{{other date|<|99|era=BC}} | 公元前在99年之前 |
>
|
{{other date|>|1999}} {{other date|a|1999-04}} {{other date|after|1999-04-01}} |
在1999年之后 在1999年4月之后 在1999年4月1日之后 |
{{other date|>|99|era=BC}} | 公元前在99年之后 |
by
|
{{other date|by|1999}} {{other date|by|1999-04}} {{other date|by|1999-04-01}} |
1999年前后 1999年4月前后 1999年4月1日前后 |
{{other date|by|99|era=BC}} | 公元前99年前后 |
from
|
{{other date|from|1999}} {{other date|from|1999-04}} {{other date|from|1999-04-01}} |
自1999年 自1999年4月 自1999年4月1日 |
{{other date|from|99|era=BC}} | 公元前自99年 |
until
|
{{other date|until|1999}} {{other date|until|1999-04}} {{other date|until|1999-04-01}} |
直到1999年 直到1999年4月 直到1999年4月1日 |
{{other date|until|99|era=BC}} | 公元前直到99年 |
~
|
{{other date|~|1999}} {{other date|ca|1999-05}} {{other date|circa|1999-05-01}} |
约1999年 约1999年5月 约1999年5月1日 |
{{other date|~|99|era=BC}} | 公元前约99年 |
s
|
{{other date|s|1960}} {{other date|decade|1800}} |
1960年代 1800年代 |
{{other date|s|960|era=BCE}} | 公元前960年代 |
century
|
{{other date|century|1}} {{other date|century|20}} |
1世纪 20世纪 |
{{other date|century|1|era=BC}} | 公元前1世纪 |
millennium
|
{{other date|millennium|1}} | 第1千年 | {{other date|millennium|2|era=BC}} | 公元前第2千年 |
turn of the decade
|
{{other date|turn of the decade|1920}} {{other date|turn of the decade|1800}} |
1910年代末1920年代初 1790年代末1800年代初 |
{{other date|turn of the decade|920|era=BC}} | 公元前920年代末910年代初 |
turn of the century
|
{{other date|turn of the century|2}} {{other date|turn of the century|20}} |
1世纪末第2世纪初 19世纪末第20世纪初 |
{{other date|turn of the century|2|era=BC}} | 公元前2世纪末第1世纪初 |
turn of the year
|
{{other date|turn of the year|1992}} | 1991年年末1992年年初 | {{other date|turn of the year|922|era=BC}} | 公元前922年年末921年年初 |
spring
|
{{other date|spring|1999}} | 1999年年春季 | {{other date|spring|99|era=AD}} | 公元99年年春季 |
summer
|
{{other date|summer|1999}} | 1999年年夏季 | {{other date|summer|99|era=BC}} | 公元前99年年夏季 |
fall
|
{{other date|fall|1999}} {{other date|autumn|1999}} |
1999年年秋季 1999年年秋季 |
{{other date|fall|99|era=AD}} | 公元99年年秋季 |
winter
|
{{other date|winter|1999}} | 1999年年冬季 | {{other date|winter|99|era=BC}} | 公元前99年年冬季 |
beginning
|
{{other date|early|1999-08}} {{other date|beginning|1999}} |
1999年8月早期 1999年早期 |
{{other date|early|99|era=BC}} | 公元前99年早期 |
mid
|
{{other date|mid|1999-10}} {{other date|middle|1999}} |
1999年10月中期 1999年中期 |
{{other date|mid|99|era=BC}} | 公元前99年中期 |
end
|
{{other date|end|1999-11}} {{other date|late|1999}} |
1999年11月晚期 1999年晚期 |
{{other date|end|99|era=BCE}} | 公元前99年晚期 |
firsthalf
|
{{other date|firsthalf|1999-11}} {{other date|1half|1999}} |
1999年11月上半期 1999年上半期 |
{{other date|firsthalf|99|era=BC}} | 公元前99年上半期 |
secondhalf
|
{{other date|secondhalf|1999-11}} {{other date|2half|1999}} |
1999年11月下半期 1999年下半期 |
{{other date|secondhalf|99|era=BCE}} | 公元前99年下半期 |
1quarter
|
{{other date|1quarter|1815-09}} {{other date|1quarter|1815}} |
1815年9月第一季度 1815年第一季度 |
{{other date|1quarter|99|era=BC}} | 公元前99年第一季度 |
2quarter
|
{{other date|2quarter|1815-09}} {{other date|2quarter|1815}} |
1815年9月第二季度 1815年第二季度 |
{{other date|2quarter|99|era=BC}} | 公元前99年第二季度 |
3quarter
|
{{other date|3quarter|1815-09}} {{other date|3quarter|1815}} |
1815年9月第三季度 1815年第三季度 |
{{other date|3quarter|99|era=BC}} | 公元前99年第三季度 |
4quarter
|
{{other date|4quarter|1815-09}} {{other date|4quarter|1815}} |
1815年9月第四季度 1815年第四季度 |
{{other date|4quarter|99|era=BC}} | 公元前99年第四季度 |
BC
|
{{other date|BC|44-03-15}} {{other date|BCE|44}} |
公元前44年3月15日 公元前44年 |
||
AD
|
{{other date|AD|944-03}} {{other date|CE|944}} |
公元944年3月 公元944年 |
||
?
|
{{other date|?|2015}} | 未知日期[1] | {{other date|?|2015|era=BC}} | 公元前未知日期[1] |
date notations without date
| {{{1}}} parameter | Example Code | Output | Example Code with era | Output with era |
|---|---|---|---|---|
?
|
{{other date|?}} {{other date|unknown}} |
未知日期 未知日期 |
{{other date|?||era=BC}} | 公元前未知日期 |
year unknown
|
{{other date|year unknown}} | 年份未知 | {{other date|year unknown|era=BC}} | 公元前年份未知 |
compound constructions
| Example Code | Output | Example Code with era | Output with era |
|---|---|---|---|
| {{Other date|2half|{{Other date|century|15}}}} | 15世纪下半期 | {{Other date|2half|{{Other date|century|15}}|era=BC}} | 公元前15世纪下半期 |
| {{otherdate|mid|{{otherdate|decade|1980}}}} | 1980年代中期 | {{otherdate|mid|{{otherdate|decade|1980}}|era=BC}} | 公元前1980年代中期 |