The difference between the dates in years
Alexander Zhirov
azhirov1991 at gmail.com
Sat Feb 10 15:53:09 UTC 2024
Is it possible to calculate the difference between dates in years
using regular means? Something like that
```
writeln(Date(1999, 3, 1).diffMonths(Date(1999, 1, 1)));
```
At the same time, keep in mind that the month and day matter,
because the difference between the year, taking into account the
month that has not come, will be less.
My abilities are not yet enough to figure it out more elegantly.
More information about the Digitalmars-d-learn
mailing list