CrystalClear Software Home Library Home Documentation Index


Function template parse_delimited_time_duration

boost::date_time::parse_delimited_time_duration — Creates a time_duration object from a delimited string.


template<typename time_duration> 
time_duration parse_delimited_time_duration(const std::string & s);


Expected format for string is "[-]h[h][:mm][:ss][.fff]". If the number of fractional digits provided is greater than the precision of the time duration type then the extra digits are truncated.

A negative duration will be created if the first character in string is a '-', all other '-' will be treated as delimiters. Accepted delimiters are "-:,.".

Copyright 2001-2005 CrystalClear Software, Inc