Template:Event/next: Difference between revisions

From A KoL Wiki
imported>Dcorrin
m Fix - parameter two needs a default value for some reason
imported>Dcorrin
Change next day to not include today
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#expr:
{{#expr:
{{ConvMonthNumber|{{{1}}}}}  
({{ConvMonthNumber|{{{1|Jarlsuary}}}}}  
- {{#expr:((({{moons/today}} + 3) / 8) round 0) mod 12}}  
- {{#expr:((({{moons/today}} + 3) / 8) round 0) mod 12}}) * 8
+ {{#expr: {{{2|1}}} - {{moons/ronald}} }}
+ {{#expr: {{{2|1}}} - {{moons/ronald}} }}
}}
+ {{#ifexpr: (({{ConvMonthNumber|{{{1|Jarlsuary}}}}} - {{#expr:((({{moons/today}} + 3) / 8) round 0) mod 12}}) * 8 + {{#expr: {{{2|1}}} - {{moons/ronald}}}}) <= 0 | 96 | 0 }}
<noinclude>
}}<noinclude>


Computes number of days until next date specified.<br/>
Computes number of days until next date specified.<br/>
Paramter 1 is the month (in Text), Parameter 2 is the Day<br/>
Parameter 1 is the month (in Text), Parameter 2 is the Day<br/>
e.g. <nowiki>{{Event/next|Bill|3}}</nowiki>
e.g. <nowiki>{{Event/next|Bill|3}}</nowiki><br/>
Date defaults to Jarlsuary 1st
q.v. [[Template:Event/nextGregorian]] for regular dates


[[Category:Utility Templates|{{PAGENAME}}]]
[[Category:Utility Templates|{{PAGENAME}}]]
</noinclude>
</noinclude>

Latest revision as of 19:58, 10 March 2013

1

Computes number of days until next date specified.
Parameter 1 is the month (in Text), Parameter 2 is the Day
e.g. {{Event/next|Bill|3}}
Date defaults to Jarlsuary 1st q.v. Template:Event/nextGregorian for regular dates