Template:PostedDate: Difference between revisions
Jump to navigation
Jump to search
Documentation
mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly>{{#ifexpr:{{#time:Y-m-d|{{{1|}}}}}<{{#time:Y-m-d|-90 days}}|[[Category:More than 90 days old| {{{1|}}}]]}}{{#ifexpr:{{#time:Y-m-d|{{{1|}}}}}<{{#time:Y-m-d|-30 days}}|{{filepath:NewScore.gif}} [[Category:Posted in {{#time:F|{{{1|}}}}}]]<span style="display:none">[[Posted on {{{1|an unknown date}}}]]</span>|[[Category:More than 30 days old| {{{1|}}}]]}}<small>(Posted {{{1}}})</small> </includeonly><noinclude> | |||
{{DisplayBox|title=Documentation|text= | |||
;Usage: {{tl|PostedDate|''<yyyy-mm-dd>''}} | |||
This template is automatically added to any new work, if the new work form is used. | |||
If the date in the first parameter is more than 90 days old, the page is added to the category "More than 90 days old". | |||
If the date in the first parameter is within 30 days of the current date, this template displays the "New" icon and adds the page to the category ''Posted in <month>’’. | |||
Regardless of the date, this template also prints "(Posted {''<yyyy-mm-dd>'') " before the CPDL number of an edition. | |||
<!--Revised May 2020 to make Templates ‘’IsNew’’ and ‘’NewWork’’ and Category ‘’New works’’ obsolete.--> | |||
}} | |||
[[Category:Templates]] | |||
<!--OLD CODE (before 2020-07-29) | |||
<includeonly>{{#ifeq: {{IsNew|{{{1}}}}}|yes|{{NewWork|{{{1}}}}}}}<small>(Posted {{{1}}})</small> </includeonly><noinclude> | <includeonly>{{#ifeq: {{IsNew|{{{1}}}}}|yes|{{NewWork|{{{1}}}}}}}<small>(Posted {{{1}}})</small> </includeonly><noinclude> | ||
{{DisplayBox|title=Documentation|text= | {{DisplayBox|title=Documentation|text= | ||
;Usage: {{tl|PostedDate|''<yyyy-mm-dd>''}} | ;Usage: {{tl|PostedDate|''<yyyy-mm-dd>''}} | ||
If the date ''<yyyy-mm-dd>'' is within 90 days of the current date, this template invokes {{tl|NewWork|''<yyyy-mm-dd>''}} which does some bookkeeping work and also displays the "New" icon if the date is within 30 days of the current date. Regardless of the date, this template also prints "<small>(Posted {''<yyyy-mm-dd>'')</small> " before the CPDL number of an edition. | If the date ''<yyyy-mm-dd>'' is within 90 days of the current date, this template invokes {{tl|NewWork|''<yyyy-mm-dd>''}} which does some bookkeeping work and also displays the "New" icon if the date is within 30 days of the current date. Regardless of the date, this template also prints "<small>(Posted {''<yyyy-mm-dd>'')</small> " before the CPDL number of an edition. | ||
}} | }} | ||
END OLD CODE--> | |||
</noinclude> |
Revision as of 01:22, 30 July 2020
- Usage
- {{PostedDate|<yyyy-mm-dd>}}
This template is automatically added to any new work, if the new work form is used.
If the date in the first parameter is more than 90 days old, the page is added to the category "More than 90 days old".
If the date in the first parameter is within 30 days of the current date, this template displays the "New" icon and adds the page to the category Posted in <month>’’.
Regardless of the date, this template also prints "(Posted {<yyyy-mm-dd>) " before the CPDL number of an edition.