Difference between revisions of "Template:Date difference/doc"
Jump to navigation
Jump to search
imported>Enterprisey (→Usage: Fix) |
imported>Vanisaac m (→See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other) |
||
Line 28: | Line 28: | ||
*[[Template:Seniority]] Calculates time in days from date given to the present day. | *[[Template:Seniority]] Calculates time in days from date given to the present day. | ||
− | <includeonly> | + | <includeonly>{{Sandbox other|| |
<!-- Categories and interwikis go here: --> | <!-- Categories and interwikis go here: --> | ||
[[Category:Date mathematics templates]] | [[Category:Date mathematics templates]] | ||
− | </includeonly> | + | }}</includeonly> |
Latest revision as of 22:48, 24 April 2020
![]() | This is a documentation subpage for Template:Date difference. It contains usage information, categories and other content that is not part of the original template page. |
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 6,679
- {{date difference|2009|9|7}} gives 5,842
- {{date difference|2009|10|29}} gives 5,790
Similarity to other templates
- {{Age in days|2007|5|24|2008|4|23}} gives 335
- {{Age in days|2007|5|24}} gives 6679
- {{Age in days|2009|9|7}} gives 5842
- {{Age in days|2009|10|29}} gives 5790
See also
- Template:Seniority Calculates time in days from date given to the present day.