Boost logo

Boost Users :

From: Gregory J. Sharp (gregor_at_[hidden])
Date: 2007-02-27 10:04:47


I'm trying to use the date_time/ptime module to parse strings.

Platform: MacOS X 10.4.7 on Intel
Compiler: gcc 4.0.1

I have three potential bugs, so far. Perhaps I'm unreasonable in
hoping that the
following strings should be acceptable to time_from_string.

1. time_from_string( "2006-12-06" ) != time_from_string( "2006-12-06
00:00:00" )
2. time_from_string( "2006/12/06" ) throws an exception (probably
related to 1)
    even though time_from_string( "2006,12,06" ) doesn't throw.
3. time_from_string( "2006-12-06 " ) throws an exception because it
passes a null
    string to str_from_delimited_time_duration(), which tries to read
the first
    character of the string, even though there isn't one.

I think 1 & 2 are probably caused by parse_delimited_time() doing a
split on ' ' and getting nothing to pass to
parse_delimited_time_duration().

--
Gregory J. Sharp                   email: gregor_at_[hidden]
Wilson Synchrotron Laboratory      url: http://www.lepp.cornell.edu/ 
~gregor
Cornell University                 ph:  +1 607 255 4882
Ithaca, NY 14853                   fax: +1 607 255 8062

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net