Boost logo

Boost Users :

From: Jeff Garland (jeff_at_[hidden])
Date: 2006-01-16 08:24:21

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:

Weeks, on the other hand, is 'no problem' since a week is always 7 days.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at