Template:MonthDiff: Difference between revisions

From 118Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 6: Line 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.
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>{{MonthDiff|2395|9|5|{{CurrentStarYear}}|{{CURRENTMONTH}}|{{CURRENTDAY2}}|,}}</nowiki></code> produces '''{{MonthDiff|2395|9|5|{{CurrentStarYear}}|{{CURRENTMONTH}}|{{CURRENTDAY2}}}}'''.
For example, <code><nowiki>{{MonthDiff|2395|9|5|{{CurrentStarYear}}|{{CURRENTMONTH}}|{{CURRENTDAY2}}|,}}</nowiki></code> produces '''{{MonthDiff|2395|9|5|{{CurrentStarYear}}|{{CURRENTMONTH}}|{{CURRENTDAY2}}|,}}'''.


'''NOTE:''' This does not error check at all.</noinclude>
'''NOTE:''' This does not error check at all.</noinclude>

Revision as of 07:53, 15 June 2020

This templates allows you to (approximately) calculate the amount of years and months between two dates.

For example, {{MonthDiff|2397|5|18|2397|6|6}} produces 1 month.

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, {{MonthDiff|2395|9|5|{{CurrentStarYear}}|{{CURRENTMONTH}}|{{CURRENTDAY2}}|,}} produces 6 years , 3 months.

NOTE: This does not error check at all.