Template:NewWorkCount2: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#expr:{{NewScoreCount|{{{1|{{CURRENTYEAR}}}}}{{#ifexpr:{{{2|}}}|-{{{2}}}}}{{#ifexpr:{{{3|}}}|-{{{3}}}}}}} - {{#dpl: category = Sheet music
{{#iferror:{{NewWorkCount3|{{{1|{{CURRENTYEAR}}}}}{{#ifexpr:{{{2|}}}|-{{{2}}}}}{{#ifexpr:{{{3|}}}|-{{{3}}}}}}}|%TOTALPAGES%}}<noinclude>
|namespace=
|mode=userformat
|categorymatch={{#ifexpr:{{{3|}}}|{{{1|{{CURRENTYEAR}}}}}-{{{2}}}-{{{3}}}|{{#ifexpr:{{{2|}}}|{{{1|{{CURRENTYEAR}}}}}-{{{2}}}|{{{1|{{CURRENTYEAR}}}}}}}}}%
|userdateformat = Y-m-d, H:i
|lastrevisionbefore = {{#time: Y-m-d|{{{1|{{CURRENTYEAR}}}}}{{#ifexpr:{{{2|}}}|-{{{2}}}|-01}}{{#ifexpr:{{{3|}}}|-{{{3}}}|-01}} - 1 day}}
|resultsheader=%TOTALPAGES%
|noresultsheader = 0
|allowcachedresults = true}}}}<noinclude>
<!--{{prot-temp}}-->
[[Category:Templates|{{PAGENAME}}]]
 
{{DisplayBox|text='''Usage''' &ndash;
{{DisplayBox|text='''Usage''' &ndash;
<!--There are four forms by which the template may be invoked:
There are four forms by which the template may be invoked:
<pre>{{NewWorkCount}}
<pre>{{NewWorkCount2}}
{{NewWorkCount|yyyy}}
{{NewWorkCount2|yyyy}}
{{NewWorkCount|yyyy|mm}}
{{NewWorkCount2|yyyy|mm}}
{{NewWorkCount|yyyy|mm|dd}}</pre>-->
{{NewWorkCount2|yyyy|mm|dd}}</pre>
'''Examples'''
'''Examples'''
<pre>{{NewWorkCount2}}</pre>
<pre>{{NewWorkCount2}}</pre>
Line 27: Line 16:
gives a count of the number of current score pages ({{NewWorkCount2|2007|09|11}}) created on September 11, 2007.
gives a count of the number of current score pages ({{NewWorkCount2|2007|09|11}}) created on September 11, 2007.
}}
}}
[[Category:Templates|{{PAGENAME}}]]
[[Category:DPL templates]]


<!--OLD CODE (2009)
{{#expr: {{NewScoreCount| {{{1|{{CURRENTYEAR}}}}}{{#ifexpr:{{{2|}}}|-{{{2}}}}}{{#ifexpr:{{{3|}}}|-{{{3}}}}}}} - {{#dpl:
|categorymatch={{{1|{{CURRENTYEAR}}}}}{{#ifexpr:{{{2|}}}|-{{{2}}}}}{{#ifexpr:{{{3|}}}|-{{{3}}}}}%
|category=Sheet music
|namespace=
|lastrevisionbefore={{#time: Ymd|{{{1|{{CURRENTYEAR}}}}}-{{{2|01}}}-{{{3|01}}}- 1 Day}}
|distinct=true
|mode=userformat
|resultsheader=%TOTALPAGES%
|noresultsheader=0
|allowcachedresults=true
}}}}
END OLD CODE-->
</noinclude>
</noinclude>

Latest revision as of 15:16, 5 June 2020

3

Usage – There are four forms by which the template may be invoked:

{{NewWorkCount2}}
{{NewWorkCount2|yyyy}}
{{NewWorkCount2|yyyy|mm}}
{{NewWorkCount2|yyyy|mm|dd}}

Examples

{{NewWorkCount2}}

gives a count of the number of current score pages (3) created in the current year (2024).

{{NewWorkCount2|2007}}

gives a count of the number of current score pages (3) created in 2007.

{{NewWorkCount2|2008|10}}

gives a count of the number of current score pages (3) created in October of 2008.

{{NewWorkCount2|2007|09|11}}

gives a count of the number of current score pages (3) created on September 11, 2007.