Template:IsNew

From ChoralWiki
Revision as of 01:43, 11 June 2012 by Carlos (talk | contribs) (simpler with #if)
Jump to navigation Jump to search


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 10 days), a "yes" is returned, forcing the template NewWork to
    • Categorize the page in the