Template:IsNew: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(susbstitute self updating code)
(Labeled as obsolete; there are no pages that use it)
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#ifexpr: {{#sub:{{{1}}}|0|4}}{{#sub:{{{1}}}|5|2}}{{#sub:{{{1}}}|8|2}} > {{CURRENTYEAR}}{{CURRENTMONTH}}{{CURRENTDAY2}} - 10000 |yes|no}}{/includeonly><noinclude>
<includeonly>{{#if:{{{1|}}}|{{#ifexpr:{{#time:Ymd | {{{1|1900-01-01}}} }} > {{#time:Ymd | -{{{range|90 days}}}}} |yes|no}}|no}}</includeonly><noinclude>
<div style="margin: 0; margin-right: 30px; margin-left: 30px; border: 1px solid #3399ff; padding: 1em 1em 1em 1em; background-color:#ddffdd">
{{DisplayBox|title=Documentation|text=
<center><big>'''Documentation'''</big></center>


This template affects the way template [[:Template:NewWork|NewWork]] behaves: dates passed as parameter that fall inside this template's date range are validated as "yes", forcing template NewWork to:
THIS TEMPLATE is now obsolete; usage information is hidden within.
# Show an icon "New" in front of the edition's CPDL#
# Insert the page in which it is contained in category [[:Category:New works|New works]]


</div>[[Category:Templates|{{PAGENAME}}]]</noinclude>
<!--;Usage: {{tl|IsNew|''<yyyy-mm-dd>''}}
:{{tl|IsNew|''<yyyy-mm-dd>''|range{{=}}''<nn days>''}}
 
The template returns "yes" or "no" depending upon whether the date passed is within the range of the current date.  In the first case the range defaults to 90 days, but in the second case it is given explicitly.
 
This template affects the behaviour of template {{CiteTemp|NewWork}} in two ways:
# If the date passed as parameter falls inside this template's default date range (currently 90 days), a "yes" is returned, forcing the template NewWork to:
#* Show an icon ([[Image:NewScore.gif]]) in front of the edition's CPDL#
#* Insert the page in which it is contained in category {{CiteCat|New works}}
# If the date passed (''yyyy-mm-dd'') falls inside the alternate date range value (currently 30 days), a "yes" is returned, forcing the template NewWork to
#* Categorize the page in category [[:Category:Posted editions by month|Posted in ''Month'']]-->
}}
 
[[Category:Obsolete templates]]</noinclude>

Latest revision as of 16:16, 31 July 2020


Documentation

THIS TEMPLATE is now obsolete; usage information is hidden within.