Template:Date: Difference between revisions

From railML 3 Wiki
Jump to navigation Jump to search
[unchecked revision][unchecked revision]
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>{{#switch:{{#sub:{{{1}}}|5|2}}
<includeonly>{{#vardefine:in|{{#replace:{{{1}}}|-}}{{#var:in}}{{#switch:{{#sub:{{{1}}}|5|2}}
|01=January
|01=January
|02=February
|02=February

Revision as of 18:17, 23 January 2023

Usage

This template parses a date of shape yyyy-mm-dd into spoken language like {{#vardefine:in|19750318March 18th 1975

Parameters

The template hase one obligatory unnamed parameter:

  • 1: a date of shape yyyy-mm-dd

Examples

Code Result
{{date|1900-01-01}} 19000101January 1st 1900
{{date|2025-11-22}} 20251122November 22nd 2025
{{date|2019-02-31}} 20190231February 31st 2019 (rubbish in→rubbish out ;)