Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:ISOdate/doc: Difference between revisions

Template page
not all ISO 8601 extended formats (not with week number or ordinal date)
Also incomplete dates are allowed: just the year or the year and the month. A year has to be written in full, with or without leading zeros. Optionally it is followed by a dash and a 2-digit month num
Line 3: Line 3:
|1d=date in [[w:ISO 8601|ISO 8601]] format.
|1d=date in [[w:ISO 8601|ISO 8601]] format.


Supported dates are any [[w:Proleptic Gregorian calendar|proleptic Gregorian calendar]] or [[w:Gregorian calendar|Gregorian calendar]] dates between 1 January 1 AD and 31 December 9999 AD. Dates BC are not yet supported. Note: A date like "99-05-01" or "07-05-01" will always refer to the day in the first century, not the day in the 20th or 21st century. Please always note down the full year.
Supported dates are any [[w:Proleptic Gregorian calendar|proleptic Gregorian calendar]] or [[w:Gregorian calendar|Gregorian calendar]] dates 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, with or 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.  
|1stat=required
|1stat=required
|2=2
|2=2

Revision as of 09:33, 13 September 2010

Takes a calendar date in ISO 8601 extended format in the form YYYY-MM-DD (e.g. "2026-08-22"), with or without time, and hands it over to {{Date}} to display it in localised format. This template is needed to catch 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: }})

Usage

{{ISOdate |1= |2= |f= |form= }}

Template parameters

ParameterDescriptionDefaultStatus
1date in ISO 8601 format. Supported dates are any proleptic Gregorian calendar or Gregorian calendar dates 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, with or 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)value of {{int:Lang}}optional
fformat ("Y" for year-only output ["{{ISOdate|2008-08-06|f=Y}}" will result in the output "6 August 2008")emptyoptional
formallows to specify differing syntactic forms to apply to the date (e.g. in some Polish phrases the month must appear in genitive form instead of nominative, so you have to set form to genemptyoptional

Additional information

The template is intended to be used in the following namespaces: all namespaces

The template is intended to be used by the following user groups: all users

See also

Localization

This template is not intended to be localized.

Test cases

{{ISOdate|2010-08-18 08:15:30Z}}: 18 August 2010, 08:15:30
{{ISOdate|2010-08-18 08:15:30}}: 18 August 2010, 08:15:30
{{ISOdate|2010-08-18 08:15}}: 18 August 2010, 08:15
{{ISOdate|2010-08-18}}: 18 August 2010
{{ISOdate|2010-08}}: August 2010
{{ISOdate|2010}}: 2010
{{ISOdate|1970-08-18 08:15:30}}: 18 August 1970, 08:15:30
{{ISOdate|1969-08-18 08:15:30}}: 18 August 1969, 08:15:30
{{ISOdate|1800-08-18 08:15:30}}: 18 August 1800, 08:15:30
{{ISOdate|999-08-18 08:15:30}}: 18 August 999 08:15:30
{{ISOdate|119-08-18 08:15:30}}: 18 August 119 08:15:30
{{ISOdate|99-08-18 08:15:30}}: 18 August 0099 08:15:30
{{ISOdate|19-08-18 08:15:30}}: 18 August 0019 08:15:30
{{ISOdate|9-08-18 08:15:30}}: 18 August 0009 08:15:30
{{ISOdate|1-08-18 08:15:30}}: 18 August 0001 08:15:30
{{ISOdate|1970-08-18}}: 18 August 1970
{{ISOdate|1969-08-18}}: 18 August 1969
{{ISOdate|1800-08-18}}: 18 August 1800
{{ISOdate|999-08-18}}: 18 August 999
{{ISOdate|119-08-18}}: 18 August 119
{{ISOdate|99-08-18}}: 18 August 0099
{{ISOdate|19-08-18}}: 18 August 0019
{{ISOdate|9-08-18}}: 18 August 0009
{{ISOdate|1-08-18}}: 18 August 0001
{{ISOdate|1970-08}}: August 1970
{{ISOdate|1969-08}}: August 1969
{{ISOdate|1800-08}}: August 1800
{{ISOdate|999-08}}: August 999
{{ISOdate|119-08}}: August 119
{{ISOdate|99-08}}: August 0099
{{ISOdate|19-08}}: August 0019
{{ISOdate|9-08}}: August 0009
{{ISOdate|1-08}}: August 0001
{{ISOdate|1970}}: 1970
{{ISOdate|1969}}: 1969
{{ISOdate|1800}}: 1800
{{ISOdate|999}}: 999
{{ISOdate|119}}: 119
{{ISOdate|99}}: 0099
{{ISOdate|19}}: 0019
{{ISOdate|9}}: 0009
{{ISOdate|1}}: 0001
{{ISOdate|0}}: 0000
{{ISOdate|1567-02-29}}: 1 March 1567
{{ISOdate|2000-02-29}}: 29 February 2000
Cookies help us deliver our services. By using our services, you agree to our use of cookies.