Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 3837

Show
Ignore:
Timestamp:
08/03/08 13:31:02 (4 months ago)
Author:
kris
Message:

fixes #1186 :: tango.text.convert.TimeStamp? does not parse times coreectly

Thanks to Madrok

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tango/text/convert/TimeStamp.d

    r3639 r3837  
    403403private bool time(T) (inout TimeOfDay time, inout T* p) 
    404404{ 
    405         return ((time.hours = parseInt(p)) > 0   && 
    406                  *p++ == ':'                     && 
    407                 (time.minutes = parseInt(p)) > 0 && 
    408                  *p++ == ':'                     && 
    409                 (time.seconds = parseInt(p)) > 0); 
     405        return ((time.hours = parseInt(p)) >= 0   && 
     406                 *p++ == ':'                      && 
     407                (time.minutes = parseInt(p)) >= 0 && 
     408                 *p++ == ':'                      && 
     409                (time.seconds = parseInt(p)) >= 0); 
    410410} 
    411411