Tech, Bureaucrats, emailconfirmed, Administrators (Semantic MediaWiki), Curators (Semantic MediaWiki), Suppressors, Administrators, threadmoderator
119,851
edits
No edit summary |
(annoyingly, I hadn't accounted for situations such as "2-3 December 2016" or even "2 - 3 December 2016". So it needs an additional layer of complexity within DMY - R, unfortunately. better than adding complexity at a higher level, where it'd affect @) |
||
Line 1: | Line 1: | ||
{{#if:{{{1|}}}|{{#iferror:{{#ifexpr:{{#explode:{{{1}}}||0}} <= 31 | {{#if:{{{1|}}}|{{#iferror:{{#ifexpr:{{#explode:{{{1}}}||0}} <= 31 | ||
|<!-- YYYY-MM-DD -->{{#if:{{#explode:{{{1}}}|-|1}} | |<!-- YYYY-MM-DD -->{{#if:{{#explode:{{{1}}}|-|1}} | ||
|<!-- R-R -->{{# | |<!-- R-R -->{{#ifexpr:1>{{#explode:{{{1}}}||0}}|<!--D-R-->{{#explode:{{{1}}}||-1}}-{{dl/n/m|{{#explode:{{{1}}}||1}}}}-{{dl/n/d|{{#explode:{{{1}}}|-|0}}}}|{{#switch:-|<!--DM - R-->{{#explode:{{{1}}}||2}}={{#explode:{{{1}}}||-1}}-{{dl/n/m|{{#explode:{{{1}}}||1}}}}|<!--D - R-->{{#explode:{{{1}}}||1}}={{#explode:{{{1}}}||-1}}-{{dl/n/m|{{#explode:{{{1}}}||3}}}}|#default=<!--DMY - R-->{{#explode:{{{1}}}||2}}-{{dl/n/m|{{#explode:{{{1}}}||1}}}}}}-{{dl/n/d|{{#explode:{{{1}}}||0}}}}}}–{{#iferror:{{#ifexpr:{{#explode:{{#explode:{{{1}}}|-|1}}||0}} <= 31|<!-- R - YYYY-MM-DD -->{{#explode:{{#explode:{{{1}}}|-|1}}||2}}-{{dl/n/m|{{#explode:{{#explode:{{{1}}}|-|1}}||1}}}}-{{dl/n/d|{{#explode:{{#explode:{{{1}}}|-|1}}||0}}}}|<!-- R - YYYY -->{{#explode:{{#explode:{{{1}}}|-|1}}||0}}}}|<!-- R - YYYY-MM -->{{#explode:{{#explode:{{{1}}}|-|1}}||1}}-{{dl/n/m|{{#explode:{{#explode:{{{1}}}|-|1}}||0}}}}}} | ||
|<!-- D -->{{#explode:{{{1}}}||2}}-{{dl/n/m|{{#explode:{{{1}}}||1}}}}-{{dl/n/d|{{#explode:{{{1}}}||0}}}} | |<!-- D -->{{#explode:{{{1}}}||2}}-{{dl/n/m|{{#explode:{{{1}}}||1}}}}-{{dl/n/d|{{#explode:{{{1}}}||0}}}} | ||
}} | }} |
edits