1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #ifndef POSIXTIME_PARSERS_HPP___
- #define POSIXTIME_PARSERS_HPP___
- #include "boost/date_time/gregorian/gregorian.hpp"
- #include "boost/date_time/time_parsing.hpp"
- #include "boost/date_time/posix_time/posix_time_types.hpp"
-
- namespace boost {
- namespace posix_time {
-
-
- inline time_duration duration_from_string(const std::string& s) {
- return date_time::parse_delimited_time_duration<time_duration>(s);
- }
- inline ptime time_from_string(const std::string& s) {
- return date_time::parse_delimited_time<ptime>(s, ' ');
- }
- inline ptime from_iso_string(const std::string& s) {
- return date_time::parse_iso_time<ptime>(s, 'T');
- }
- } }
- #endif
|