d end date</p></li>
<li><p>\(d_2\) is the number of days to the second date from the start
of that year</p></li>
<li><p>\({dy}_1\) is 366 if the first date is in a leap year. Otherwise
it is 365</p></li>
<li><p>\({dy}_2\) is 366 if the second date is in a leap year. Otherwise
it is 365</p></li>
</ul>

<p>The order of <code>date1</code> and <code>date2</code> is not important. If <code>date1</code>
is less than <code>date2</code> then the result will be non-negative. Otherwise,
the result will be negative.</