Template:Event/next: Difference between revisions
From A KoL Wiki
imported>Cool12309 m Typo |
imported>Dcorrin Fix for bug with negative date |
||
Line 3: | Line 3: | ||
- {{#expr:((({{moons/today}} + 3) / 8) round 0) mod 12}}) * 8 | - {{#expr:((({{moons/today}} + 3) / 8) round 0) mod 12}}) * 8 | ||
+ {{#expr: {{{2|1}}} - {{moons/ronald}} }} | + {{#expr: {{{2|1}}} - {{moons/ronald}} }} | ||
+ {{#ifexpr: ({{ConvMonthNumber|{{{1|Jarlsuary}}}}} | + {{#ifexpr: (({{ConvMonthNumber|{{{1|Jarlsuary}}}}} - {{#expr:((({{moons/today}} + 3) / 8) round 0) mod 12}}) * 8 + {{#expr: {{{2|1}}} - {{moons/ronald}}}}) < 0 | 96 | 0 }} | ||
}}<noinclude> | }}<noinclude> | ||
Line 10: | Line 10: | ||
e.g. <nowiki>{{Event/next|Bill|3}}</nowiki><br/> | e.g. <nowiki>{{Event/next|Bill|3}}</nowiki><br/> | ||
Date defaults to Jarlsuary 1st | Date defaults to Jarlsuary 1st | ||
q.v. [[Template:Event/nextGregorian]] for regular dates | |||
[[Category:Utility Templates|{{PAGENAME}}]] | [[Category:Utility Templates|{{PAGENAME}}]] | ||
</noinclude> | </noinclude> |
Revision as of 20:04, 7 December 2012
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