Boost logo

Boost :

Subject: Re: [boost] [date_time] quarters as new durations?
From: pete_at_[hidden]
Date: 2009-12-22 09:03:39


On Tue 22/12/09 13:54 , "Stewart, Robert" <Robert.Stewart_at_[hidden]> wrote:

> wrote:
> > On Tue 22/12/09 13:27 , "Stewart, Robert" wrote:
> > > Jeff Garland wrote:
> > > >
> > > > Month durations play some games to handle this problem (see
> > > > docs for details) which quarters could adopt. But if you
> > > > adopt the month rules then I don't thing you buy much more
> > > > than simply writing
> > > >
> > > > const months quarters = months(3);
> >
> > > That's an excellent point. I don't think the fuzzy math
> approach is
> > > appropriate for quarters because they have a precise definition:
> 1/4
> > > of a year. Months are less precise, though 365 / 4 is not a
> whole
> > > number, of course.
> >
> > Possibly opening a can of worms here, but a quarter in my
> > line of work is invariably three months. If your mileage
> > varies, then there could be a problem in providing a fully
> > meaningful quarter duration type if people think it means
> > different things.
> Jeff's idea of months(3) is all you need, right?

Yup, and in fact I use exactly that approach at the moment. A new duration type with quarter in the name that meant something other than three months could serve to confuse as much as it helps though, IMO.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk