Boost logo

Boost :

From: Kostya Altukhov (kostya_at_[hidden])
Date: 2002-04-26 06:00:37


William E. Kempf wrote:

>That said... I'm not sure that parsing (reading) of dates should actually
>strictly conform to any format string. As long as the strings are never
>entered by a human this works, but if you need to allow for human input (and
>can't constrain the input with something like a GUI formatted input widget)
>then the exact parsing becomes nearly useless.
>
I think that a strict parser based on format string will be useful even if
more intelligent option is also provided. After all, input validation and
date parsing are different tasks. In many cases at the time of parsing
we are sure about the format of the input string, and in these cases I
would prefer to rely on strict format parser rather than to trust some
guessing algorithm.

Best regards,
Kostya


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