Template:ISOdate

提供: VANGUARD FLIGHT wiki
移動先: 案内検索


Documentation icon テンプレートの解説[見る] [編集] [履歴] [キャッシュを削除]

この解説はTemplate:ISOdate/docから呼び出されています。

(説明文のこの部分は一部の言語のみで利用できます。)

For a calendar date in ISO 8601 extended format in the form YYYY-MM-DD (e.g. "2016-03-14"), with or without time, this template extracts the year, month, day and time, and calls {{date}} with the year, month and day found to display the date in localised format, with the time, if specified, appended. It provides the convenience of passing on a date (or even a date and a time) from one template to another as a single parameter, even though {{date}} eventually needs the date components separately.

This template overcomes some flaws of the automatic conversion by {{#time: }} for non-full dates (e.g. "77-09" for September 77 AD, which would throw an error with {{#time: }}).

使用法

{{ISOdate |1= |class= }}

<templatedata-doc-params>

ParameterDescriptionDefaultStatus
1Any proleptic Gregorian calendar or Gregorian calendar date between 1 January 1 AD and 31 December 9999 AD. Dates BC are not yet supported. Also incomplete dates are allowed: just the year or the year and the month. A year has to be written in full, without leading zeros. Optionally it is followed by a dash and a 2-digit month number; optionally this is followed by a dash and a 2-digit day number; optionally this is followed by the time.emptyrequired
2language code (only needs to be provided if the language shall be fixed and independent from the user's preferences)language code of the user languageoptional
debugSetting "debug=1" helps with debuggingemptyoptional
formallows to specify grammatical case for the month, for languages that use them. Possible cases: emptyoptional
classallows to set the html class of the time node where the date is included. This is useful for microformats. The default value is, for legacy reasons, "dtstart" (used by hCalendar). See the microformats project.dtstartoptional

追加情報

このテンプレートは、以下の名前空間で使用されることを想定しています: すべての名前空間

このテンプレートは、以下の利用者グループによって使用されることを想定しています: すべての利用者

依存先:
{{date}}, {{ISOdate/time2}}, {{ISOdate/time3}},

使用例

{{ISOdate|2009-08-18}}

以下のように表示されます:

参照

(説明文のこの部分は一部の言語のみで利用できます。)

{{date}}, {{other date}}, {{ISOyear}}

ローカライズ

このテンプレートは、翻訳されることを想定していません。


Test cases

{{ISOdate|2010-08-18 18:15:30Z}}: 2010-08-18 18:15:30Z
{{ISOdate|2010-08-18 08:15:30}}: , 08:15:30
{{ISOdate|2010-08-18 08:15}}: , 08:15
{{ISOdate|2010-08-18}}:
{{ISOdate|2010-08}}:
{{ISOdate|2010}}:
{{ISOdate|1970-08-18 08:15:30}}: , 08:15:30
{{ISOdate|1969-08-18 08:15:30}}: , 08:15:30
{{ISOdate|1800-08-18 08:15:30}}: , 08:15:30
{{ISOdate|999-08-18 08:15:30}}: , 08:15:30
{{ISOdate|119-08-18 08:15:30}}: , 08:15:30
{{ISOdate|99-08-18 08:15:30}}: , 08:15:30
{{ISOdate|19-08-18 08:15:30}}: , 08:15:30
{{ISOdate|9-08-18 08:15:30}}: , 08:15:30
{{ISOdate|1-08-18 08:15:30}}: , 08:15:30
{{ISOdate|1970-08-18}}:
{{ISOdate|1969-08-18}}:
{{ISOdate|1800-08-18}}:
{{ISOdate|999-08-18}}:
{{ISOdate|119-08-18}}:
{{ISOdate|99-08-18}}:
{{ISOdate|19-08-18}}:
{{ISOdate|9-08-18}}:
{{ISOdate|1-08-18}}:
{{ISOdate|1970-08}}:
{{ISOdate|1969-08}}:
{{ISOdate|1800-08}}:
{{ISOdate|999-08}}:
{{ISOdate|119-08}}:
{{ISOdate|99-08}}:
{{ISOdate|19-08}}:
{{ISOdate|9-08}}:
{{ISOdate|1-08}}:
{{ISOdate|1970}}:
{{ISOdate|1969}}:
{{ISOdate|1800}}:
{{ISOdate|999}}:
{{ISOdate|119}}:
{{ISOdate|99}}:
{{ISOdate|19}}:
{{ISOdate|9}}:
{{ISOdate|1}}:
{{ISOdate|0}}:
{{ISOdate|1567-02-29}}: 1567-02-29
{{ISOdate|2000-02-29}}:
<div style="clear:both;" />