New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
time_parsers.hpp in vendors/XIOS/current/extern/boost/include/boost/date_time/posix_time – NEMO

source: vendors/XIOS/current/extern/boost/include/boost/date_time/posix_time/time_parsers.hpp @ 3428

Last change on this file since 3428 was 3428, checked in by rblod, 12 years ago

importing initial XIOS vendor drop

File size: 1.3 KB
Line 
1#ifndef POSIXTIME_PARSERS_HPP___
2#define POSIXTIME_PARSERS_HPP___
3
4/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
5 * Use, modification and distribution is subject to the
6 * Boost Software License, Version 1.0. (See accompanying
7 * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
8 * Author: Jeff Garland
9 * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
10 */
11
12#include "boost/date_time/gregorian/gregorian.hpp"
13#include "boost/date_time/time_parsing.hpp"
14#include "boost/date_time/posix_time/posix_time_types.hpp"
15
16 
17namespace boost {
18
19namespace posix_time {
20
21  //! Creates a time_duration object from a delimited string
22  /*! Expected format for string is "[-]h[h][:mm][:ss][.fff]".
23   * A negative duration will be created if the first character in
24   * string is a '-', all other '-' will be treated as delimiters.
25   * Accepted delimiters are "-:,.". */
26  inline time_duration duration_from_string(const std::string& s) {
27    return date_time::parse_delimited_time_duration<time_duration>(s);
28  }
29
30  inline ptime time_from_string(const std::string& s) {
31    return date_time::parse_delimited_time<ptime>(s, ' ');
32  }
33
34  inline ptime from_iso_string(const std::string& s) {
35    return date_time::parse_iso_time<ptime>(s, 'T');
36  }
37
38
39
40} } //namespace posix_time
41
42
43#endif
44
Note: See TracBrowser for help on using the repository browser.