ಟೆಂಪ್ಲೇಟ್:YMD to ISO
ತೊಜುನ
| This template uses Lua: |
{{YMD to ISO}} converts a date in YMD format (e.g. 2000 January 17) to ISO 8601 format (e.g. 2000-01-17). Any input which is not a valid DMY date is passed through unchanged. This template is designed to preprocess dates for use with the #time parser function, which is unable to convert YMD dates, and for use with templates such as {{Date}} or {{ISO date}} which are implemented using the #time parser function.
Usage
[ಸಂಪೊಲಿಪುಲೆ]{{YMD to ISO|date in YMD format}}
Examples
[ಸಂಪೊಲಿಪುಲೆ]Full month names
[ಸಂಪೊಲಿಪುಲೆ]{{YMD to ISO|2000 January 17}}→ 2000-01-17{{YMD to ISO|2000 February 29}}→ 2000-02-29{{YMD to ISO|2001 February 28}}→ 2001-02-28{{YMD to ISO|2000 december 17}}→ 2000-12-17{{YMD to ISO|2000 DECEMBER 17}}→ 2000-12-17
Abbreviated month names
[ಸಂಪೊಲಿಪುಲೆ]{{YMD to ISO|2000 Sep 1}}→ 2000-09-01{{YMD to ISO|2000 Sept 1}}→ 2000-09-01{{YMD to ISO|2000 Sept. 1}}→ 2000-09-01{{YMD to ISO|2000 dec 1}}→ 2000-12-01{{YMD to ISO|2000 DEC. 1}}→ 2000-12-01
Dates in other formats (unchanged)
[ಸಂಪೊಲಿಪುಲೆ]{{YMD to ISO|1 December 2000}}→ 1 December 2000{{YMD to ISO|December 1, 2000}}→ December 1, 2000
Used as input
[ಸಂಪೊಲಿಪುಲೆ]With the {{#time}} parser function:
{{#time: r|{{YMD to ISO|2000 January 17}}}}→ Mon, 17 Jan 2000 00:00:00 +0000- without {{YMD to ISO}}:
{{#time: r|2000 January 17}}→ ದೋಷ: ಸಮಯ ತಪ್ಪಾತ್ಂಡ್.
With the {{Date}} template:
{{Date|{{YMD to ISO|2000 January 17}}|dmy}}→ ೧೭ ಜನವರಿ ೨೦೦೦- without {{YMD to ISO}}:
{{Date|2000 January 17|dmy}}→ 2000 January 17 (not converted to dmy)
With the {{ISO date}} template:
{{ISO date|{{YMD to ISO|2000 January 17}}|dmy}}→ ೨೦೦೦-೦೧-೧೭- without {{YMD to ISO}}:
{{ISO date|2000 January 17|dmy}}→ ದೋಷ: ಸಮಯ ತಪ್ಪಾತ್ಂಡ್.
With non-existent dates (unchanged):
{{YMD to ISO|2013 February 29}}→ 2013 February 29 (2013 was not a leap year){{YMD to ISO|2012 April 31}}→ 2012 April 31 (April does not have 31 days){{YMD to ISO|2012 March 0}}→ 2012 March 0 (valid day ranges are from 1-31)
See also
[ಸಂಪೊಲಿಪುಲೆ]Date and time templates
Multiple units of time
[ಸಂಪೊಲಿಪುಲೆ]| Type | Adjustable | Current | Last | Next |
|---|---|---|---|---|
| Date and time |
|
|
||
| Date only | ||||
| Month and year only |
|
| ||
| Time only |
|
|
||
| Banners |
|
|||
| Timestamp |
|
Single units of time
[ಸಂಪೊಲಿಪುಲೆ]| Unit of time | Adjustable | Current | Last | Next |
|---|---|---|---|---|
| Second |
|
|||
| Minute |
|
|||
| Hour |
|
|||
| Week |
|
|||
| Day of Week |
|
|
||
| Month |
|
|
|
|
| Day of Month |
|
|||
| Year |
|
|
| |
| Day of Year |
|
|||
| Decade |
|
|
||
| Century |
|
|
||
| Millenium |
|
Date and time templates made for substitution
[ಸಂಪೊಲಿಪುಲೆ]Parser functions
[ಸಂಪೊಲಿಪುಲೆ]- mw:Special:MyLanguage/time permits a custom time specifier string, similar to the C date and time functions
Individual templates
[ಸಂಪೊಲಿಪುಲೆ]- {{Calendar}}
- {{Calendar clock with Wikipedia stats}}
- {{Clock}}
- {{Digital clock}}
- {{Digital clock and date}}
- {{Infobox calendar date today}}