Subject: Re: [boost] [gsoc 2013] draft proposal for chrono::date
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2013-05-06 03:46:10
Le 06/05/13 02:12, Anurag Kalia a écrit :
>> Is this being considered for field types, serial types, or both?
>> The reason I ask is that all serial values are valid dates, at least those
>> in range, and we can make the range as big as we want. It is only the
>> field types that are problematic when day, month, or week is out of range.
> The problem with this function is that it can give us a false sense of
> security. If we ask it to make an unchecked date "31-feb-2013", it would
> gladly do it for us. With field representation, we can catch it. But with
> serial representation, it would make a valid but wrong date! I don't think a
> valid date that the user didn't ask for is really a valid date, is it?
Good point Anarag.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk