Note: This template is used on a lot of pages. In order not to put too much load on the servers, edits should be kept to a bare minimum. Please discuss proposed changes on the talk page first.
Afterwards, changes can initially be done at and tested with Template:ISOyear/sandbox.
|
![]() |
This template has been protected from editing to prevent vandalism. Please discuss changes on the talk pageorrequest unprotection. |
Extracts year from calendar dates in ISO 8601 extended format (YYYY-MM-DD, e.g. "2024-06-24"). This template is very similar to {{#time: Y}} parser function , but accepts a year as input, even in cases where #time would interpret that as a time. In the case of wrong input template does not return anything.
{{ISOyear |1= }}
Parameter | Description | Default | Status | |
---|---|---|---|---|
1 | date in ISO 8601 format. Supported formats: YYYY-MM-DD, YYYY-MM, YYYY. Other formats not officially supported but returning correct results include: single digit months and days and years without months or days can have any number of digits. Supported dates are any proleptic Gregorian calendarorGregorian calendar dates between 1 January 0001 AD and 31 December 9999 AD. | empty | required |
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
Relies on:
Module:DateI18n
This template is not intended to be localized.
More tests can be found at Template:ISOyear/testcases.
YYYY-MM-DD tests:
YYYY-MM tests:
YYYY tests:
0ther: