Difference between revisions of "Template:PrettyDate"
From DAS Wiki
Line 3: | Line 3: | ||
</noinclude> | </noinclude> | ||
<includeonly> | <includeonly> | ||
− | {{#ifeq:{{#len:{{{value}}}}}|4| | + | {{#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 --> | |
− | {{# | + | {{#time:F j, Y|{{{value}}}}} <!-- or full date --> |
− | |||
− | {{#time:F Y|{{{value}}}}} | ||
}}<!--end of if--> | }}<!--end of if--> | ||
}}<!--end of ifeq--> | }}<!--end of ifeq--> | ||
</includeonly> | </includeonly> |
Revision as of 23:09, May 12, 2021
This is the PrettyDate template. It converts various date records to the January 1, 2021 format.