Template:IsNew: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
m (simpler with #if)
(Labeled as obsolete; there are no pages that use it)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}|{{#ifexpr:{{#time:Ymd | {{{1|1900-01-01}}} }} > {{#time:Ymd | -{{{range|90 days}}}}} |yes|no}}|no}}</includeonly><noinclude>
<includeonly>{{#if:{{{1|}}}|{{#ifexpr:{{#time:Ymd | {{{1|1900-01-01}}} }} > {{#time:Ymd | -{{{range|90 days}}}}} |yes|no}}|no}}</includeonly><noinclude>
{{DisplayBox|bgcolor=g|text=
{{DisplayBox|title=Documentation|text=
<center><big>'''Documentation'''</big></center>


;Usage: <tt><nowiki>{{</nowiki>IsNew{{!}}''<yyyy-mm-dd>''<nowiki>}}</nowiki></tt>
THIS TEMPLATE is now obsolete; usage information is hidden within.
:<tt><nowiki>{{</nowiki>IsNew{{!}}''<yyyy-mm-dd>''{{!}}range=''<nn days>''<nowiki>}}</nowiki></tt>
 
<!--;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.
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.
Line 12: Line 13:
#* Show an icon ([[Image:NewScore.gif]]) in front of the edition's CPDL#
#* 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}}
#* 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 10 days), a "yes" is returned, forcing the template NewWork to
# 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 the [[Category:''yyyy-mm-dd'']]
#* Categorize the page in category [[:Category:Posted editions by month|Posted in ''Month'']]-->
}}[[Category:Templates|{{PAGENAME}}]]</noinclude>
}}
 
[[Category:Obsolete templates]]</noinclude>

Latest revision as of 16:16, 31 July 2020


Documentation

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