Template:Date difference

From MattWiki
Jump to: navigation, search
Documentation icon Template documentation[view] [edit] [history] [purge]

Usage

{{|month1= |day1= |year1= |month2= |day2= | year2=}}

This template returns the number of days between two dates. With unnamed parameters:

{{date difference|year1|month1|day1|year2|month2|day2}}

With unnamed parameters, calculating the days between today and the given date:

{{date difference|year1|month1|day1}}

Examples

  • {{date difference|2007|5|24|2008|4|23}} gives 335
  • {{date difference|2007|5|24}} gives 3,831
  • {{date difference|2009|9|7}} gives 2,994
  • {{date difference|2009|10|29}} gives 2,942

Similarity to other templates

  • {{Age in days|2007|5|24|2008|4|23}} gives 335
  • {{Age in days|2007|5|24}} gives 3831
  • {{Age in days|2009|9|7}} gives 2994
  • {{Age in days|2009|10|29}} gives 2942

See also