I've used boost::gregorian::date a bit now.
I can see that there are the related months & years & weeks duration types. I can see how to use known durations to advance a given date.
Qu: But how can I get the difference between two dates in months (or years or weeks) ?
I was hoping to find a function like:
template<typename DURATION>
DURATION date_diff<DURATION>(const date& d1,const date& d2);
There would need to be some handling of rounding too.
This function would return the number of (say) whole months between d1 and d2.