Template:IsNew: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(doc updated)
(Documentation updated)
Line 12: Line 12:
#* 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 30 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 categories [[:Category:Posted editions by day of month|Posted on day ''dd'']] and [[:Category:Posted editions by month|Posted in ''Month'']]
#* Categorize the page in category [[:Category:Posted editions by month|Posted in ''Month'']]
}}
}}


[[Category:Templates]]</noinclude>
[[Category:Templates]]</noinclude>

Revision as of 15:01, 1 November 2018


Documentation
Usage
{{IsNew|<yyyy-mm-dd>}}
{{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 NewWork in two ways:

  1. 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 (NewScore.gif) in front of the edition's CPDL#
    • Insert the page in which it is contained in category New works
  2. 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