Difference between revisions of "Template:DATEDIFF"

From blackwiki
Jump to navigation Jump to search
imported>PanchoS
(an Benutzerraum angepasst)
imported>PanchoS
(self-revert - sorry!!!)
Line 1: Line 1:
<includeonly>{{#expr:{{../JULIANDAY|{{{4}}}|{{{5}}}|{{{6}}}|{{{10|12}}}|{{{12|0}}}|{{{14|0}}}}-{{JULIANDAY|{{{1}}}|{{{2}}}|{{{3}}}|{{{9|12}}}|{{{11|0}}}|{{{13|0}}}}}}}</includeonly><noinclude>{{Template documentation}}
+
<includeonly>{{#expr:{{JULIANDAY|{{{4}}}|{{{5}}}|{{{6}}}|{{{10|12}}}|{{{12|0}}}|{{{14|0}}}}-{{JULIANDAY|{{{1}}}|{{{2}}}|{{{3}}}|{{{9|12}}}|{{{11|0}}}|{{{13|0}}}}}}}</includeonly><noinclude>{{Template documentation}}
  
 
This template returns the difference in days (possibly with decimals) between two dates in the Gregorian calendar.
 
This template returns the difference in days (possibly with decimals) between two dates in the Gregorian calendar.

Revision as of 09:51, 26 July 2006

Template:Template documentation

This template returns the difference in days (possibly with decimals) between two dates in the Gregorian calendar.

The return value is positive if date2 comes after date1, it is negative if date2 comes before date1 (i.e. the template computes date2-date1).

Syntax:
{{DATEDIFF|year1|month1|day1|year2|month2|day2}}
{{DATEDIFF|year1|month1|day1|year2|month2|day2|hour1|hour2}}
{{DATEDIFF|year1|month1|day1|year2|month2|day2|hour1|hour2|minute1|minute2}}
{{DATEDIFF|year1|month1|day1|year2|month2|day2|hour1|hour2|minute1|minute2|second1|second2}}
  • The dates can optionally be given more precision with time (their default time is noon, i.e. 12:00:00 UTC), for computing timezones.
See also: