Difference between revisions of "Template:PostedOn"

From ChoralWiki
Jump to navigation Jump to search
m (Main namespace only)
(updated to use relative dates)
Line 1: Line 1:
 
<includeonly>{{#dpl:category=Sheet music
 
<includeonly>{{#dpl:category=Sheet music
|category=Posted {{{1|1900-01-01}}}
+
|category=Posted {{switch|{{#expr:({{#time:U|today}} - {{#time:U| {{{1|1900-01-01}}} }}) / 86400}}
 +
|case: 0=today
 +
|case: 1=yesterday
 +
|default={{#expr:({{#time:U|today}} - {{#time:U| {{{1|1900-01-01}}} }}) / 86400}} days ago
 +
}}
 
|order=ascending
 
|order=ascending
 
|ordermethod=title
 
|ordermethod=title
Line 10: Line 14:
 
Lists all scores posted on CPDL on a given day
 
Lists all scores posted on CPDL on a given day
 
;Syntax : <tt><nowiki>{{PostedOn|yyyy-mm-dd}}</nowiki></tt>
 
;Syntax : <tt><nowiki>{{PostedOn|yyyy-mm-dd}}</nowiki></tt>
[[Category:Templates|{{PAGENAME}}]]
+
 
</noinclude>
+
[[Category:Templates]]</noinclude>

Revision as of 06:49, 27 May 2014

Lists all scores posted on CPDL on a given day

Syntax
{{PostedOn|yyyy-mm-dd}}