Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Function template str_from_delimited_time_duration

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

Synopsis

// In header: <boost/date_time/time_parsing.hpp>


template<typename time_duration, typename char_type> 
  time_duration 
  str_from_delimited_time_duration(const std::basic_string< char_type > & s);

Description

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 "-:,.".


PrevUpHomeNext