Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Function template parse_date

boost::date_time::parse_date — Generic function to parse a delimited date (eg: 2002-02-10).

Synopsis

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


template<typename date_type> 
  date_type parse_date(const std::string & s, int order_spec = ymd_order_iso);

Description

Accepted formats are: "2003-02-10" or " 2003-Feb-10" or "2003-Feburary-10" The order in which the Month, Day, & Year appear in the argument string can be accomodated by passing in the appropriate ymd_order_spec


PrevUpHomeNext