Difference between revisions of "Template:PrettyDate"
From DAS Wiki
Line 4: | Line 4: | ||
<includeonly> | <includeonly> | ||
{{#ifeq:{{#len:{{{value}}}}}|4|{{#time:Y|{{{value}}}}}| <!-- 4 digits long must mean year only --> | {{#ifeq:{{#len:{{{value}}}}}|4|{{#time:Y|{{{value}}}}}| <!-- 4 digits long must mean year only --> | ||
− | {{#ifeq{{{precision}}}|2|{{#time:F Y|{{{value}}}}}| <!--precision of 2 means Month and Year --> | + | {{#ifeq:{{{precision}}}|2|{{#time:F Y|{{{value}}}}}| <!--precision of 2 means Month and Year --> |
{{#time:F j, Y|{{{value}}}}} <!-- or full date --> | {{#time:F j, Y|{{{value}}}}} <!-- or full date --> | ||
}}<!--end of if--> | }}<!--end of if--> | ||
}}<!--end of ifeq--> | }}<!--end of ifeq--> | ||
</includeonly> | </includeonly> |
Revision as of 23:27, May 12, 2021
This is the PrettyDate template. It converts various date records from a 2021-2-1 format to a February 1, 2021 format.