Template:WeekDiff: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
(Description.) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#expr:{{ | <includeonly>{{#expr:{{{4}}}*52+{{{5}}}*(4+(1/3))+{{{6}}}/7-({{{1}}}*52+{{{2}}}*(4+(1/3))+{{{3}}}/7)round0}} weeks</includeonly><noinclude> | ||
This templates allows you to (approximately) calculate the amount of weeks between two dates. | |||
< | For example, <code><nowiki>{{WeekDiff|2397|5|18|2397|6|6}}</nowiki></code> produces '''{{WeekDiff|2397|5|18|2397|6|6}}'''. | ||
If you want to use the current date, use <code><nowiki>{{CurrentStarYear}}</nowiki></code> to get the current staryear. Use <code><nowiki>{{CURRENTMONTH}}</nowiki></code> to produce the current month, and <code><nowiki>{{CURRENTDAY2}}</nowiki></code> for the day of the month. | |||
For example, <code><nowiki>{{WeekDiff|2395|9|5|{{CurrentStarYear}}|{{CURRENTMONTH}}|{{CURRENTDAY2}}}}</nowiki></code> produces '''{{WeekDiff|2395|9|5|{{CurrentStarYear}}|{{CURRENTMONTH}}|{{CURRENTDAY2}}}}'''. | |||
'''NOTE:''' This does not error check at all.</noinclude> |
Latest revision as of 12:05, 6 June 2020
This templates allows you to (approximately) calculate the amount of weeks between two dates.
For example, {{WeekDiff|2397|5|18|2397|6|6}}
produces 3 weeks.
If you want to use the current date, use {{CurrentStarYear}}
to get the current staryear. Use {{CURRENTMONTH}}
to produce the current month, and {{CURRENTDAY2}}
for the day of the month.
For example, {{WeekDiff|2395|9|5|{{CurrentStarYear}}|{{CURRENTMONTH}}|{{CURRENTDAY2}}}}
produces 323 weeks.
NOTE: This does not error check at all.