Template:MonthDiff

From 118Wiki
Jump to navigation Jump to search

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 5 years 8 months.

If you want to seperate the years and months with a character or word, simply add another argument to the template: {{MonthDiff|2394|2|12|2396|15|4|,}} which produces 2 years, 5 months. Or use {{MonthDiff|2394|2|12|2396|15|4| and}} to get 4 years and 10 months.

NOTE: This does not error check at all.