Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-04-25 16:03:18


"Jeff Garland" <jeff_at_[hidden]> writes:

> On Sun, 25 Apr 2004 14:32:28 -0400, Daryle Walker wrote
>> On 4/24/04 9:35 AM, "Jeff Garland" <jeff_at_[hidden]> wrote:
>>
>> > On Fri, 23 Apr 2004 23:22:34 -0400, Daryle Walker wrote
>> [SNIP]
>> >> (Or does every date-time object work at the
>> >> fractional-second level? If so, maybe that's what needs fixing.)
>> >
>> > No, boost::gregorian::date has a resolution of 1 day -- it can't represent
>> > hours, minutes, etc...
>>
>> So maybe a new type should be made that just represents year &
>> month. Every year still only has 12 months. Of course, your
>> problem comes back if you want to mix days in.
>
> Exactly, and I don't know what I would do with this type without mixing them
> back in...

    if (some_date.is_in(Jun/2004))
       std::cout << "that's a hot one!";

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

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