Abrir menu principal

UESPWiki β

Alterações

Predefinição:ESDate

1 253 bytes adicionados, 06h47min de 23 de agosto de 2010
Elder Scrolls Date Format
<includeonly><cleanspace>
{{#local:days|Sundas/Morndas/Tirdas/Middas/Turdas/Fredas/Loredas}}
{{#local:months|Morning Star/Sun's Dawn/First Seed/Rain's Hand/Second Seed/Midyear/Sun's Height/Last Seed/Hearthfire/Frostfall/Sun's Dusk/Evening Star}}

{{#local:style|date|if={{#iferror:{{#time:|{{{date|err}}}}}|0|1}}}} <!-- Only set if date is valid. -->
{{#local:style|YMD|if={{#iferror:{{#expr:{{{year|err}}}+{{{month|err}}}+{{{day|err}}}}}|0|1}}}}
{{#local:style|MDW|if={{#iferror:{{#expr:{{{month|err}}}+{{{day|err}}}+{{{dow|err}}}}}|0|1}}}}
<!-- If style is none of the above, ignore all inputs and use current date. -->
{{#if:{{{style|}}}||{{#unset:year}}{{#unset:month}}{{#unset:day}}{{#unset:dow}}{{#local:date|{{CURRENTTIMESTAMP}}}}{{#local:style|date}}}}

{{#local:year |{{#time:Y|{{{date}}}}}|if={{#ifeq:{{{style|}}}|date|1}}}}
{{#define:month|{{#time:n|{{{date}}}}}}}
{{#define:day |{{#time:j|{{{date}}}}}}}
{{#define:dow |{{#time:w|{{#switch:{{{style|}}}|YMD={{{year}}}-{{{month}}}-{{{day}}}|date={{{date}}}}}}}}}
</cleanspace>{{#explode:{{{days}}}|/|{{{dow}}}}}, {{Ordinal|{{{day}}}}} of {{#explode:{{{months}}}|/|{{#expr:{{{month}}}-1}}}}{{#if:{{{showyear|}}}|{{#if:{{{year|}}}|, {{{year}}}}}}}</includeonly><noinclude>{{/Doc}}</noinclude>
49 380
edições