www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Using dates to get days count

reply Joel <joelcnz gmail.com> writes:
How do I count the days between to dates?
Sep 28 2017
parent reply rikki cattermole <rikki cattermole.co.nz> writes:
On 29/09/2017 7:29 AM, Joel wrote:
 How do I count the days between to dates?
https://dlang.org/phobos/std_datetime_date.html#.Date.opBinary.2 https://dlang.org/phobos/core_time.html#.Duration.total
Sep 28 2017
parent Joel <joelcnz gmail.com> writes:
On Friday, 29 September 2017 at 06:32:19 UTC, rikki cattermole 
wrote:
 On 29/09/2017 7:29 AM, Joel wrote:
 How do I count the days between to dates?
https://dlang.org/phobos/std_datetime_date.html#.Date.opBinary.2 https://dlang.org/phobos/core_time.html#.Duration.total
Thanks rikki. I did know the opBinary thing. I was actually using a version where I used the string returned from the date1 - date2, (eg. I pretty much times the weeks by 7 and added the left over days).
Sep 28 2017