16 Jan
2006
16 Jan
'06
1:24 p.m.
On Mon, 16 Jan 2006 08:26:56 +0100, Oliver.Kowalke wrote
Hello, how can I extract the months from a date_duration?
There isn't a way. date_duration is just a count of days. A month is a logical concept of variable length (28, 30, 31, etc) So there's really no way to go from 300 days to ??? months -- it depends on the context. This leads to all kinds of problems including the reversiblity of operations issues: http://www.boost.org/doc/html/date_time/gregorian.html#snap_to_details Weeks, on the other hand, is 'no problem' since a week is always 7 days. Jeff