comparison DEPENDENCIES/generic/include/boost/date_time/date_parsing.hpp @ 101:c530137014c0

Update Boost headers (1.58.0)
author Chris Cannam
date Mon, 07 Sep 2015 11:12:49 +0100
parents 2665513ce2d3
children
comparison
equal deleted inserted replaced
100:793467b5e61c 101:c530137014c0
4 /* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. 4 /* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc.
5 * Use, modification and distribution is subject to the 5 * Use, modification and distribution is subject to the
6 * Boost Software License, Version 1.0. (See accompanying 6 * Boost Software License, Version 1.0. (See accompanying
7 * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) 7 * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
8 * Author: Jeff Garland, Bart Garst 8 * Author: Jeff Garland, Bart Garst
9 * $Date: 2012-09-30 16:25:22 -0700 (Sun, 30 Sep 2012) $ 9 * $Date$
10 */ 10 */
11 11
12 #include <string> 12 #include <string>
13 #include <iterator> 13 #include <iterator>
14 #include <algorithm> 14 #include <algorithm>
111 } 111 }
112 else { // (order_spec == ymd_order_us) 112 else { // (order_spec == ymd_order_us)
113 spec_str = "mdy"; 113 spec_str = "mdy";
114 } 114 }
115 115
116 typedef typename date_type::year_type year_type;
117 typedef typename date_type::month_type month_type; 116 typedef typename date_type::month_type month_type;
118 unsigned pos = 0; 117 unsigned pos = 0;
119 unsigned short year(0), month(0), day(0); 118 unsigned short year(0), month(0), day(0);
120 typedef typename std::basic_string<char>::traits_type traits_type; 119 typedef typename std::basic_string<char>::traits_type traits_type;
121 typedef boost::char_separator<char, traits_type> char_separator_type; 120 typedef boost::char_separator<char, traits_type> char_separator_type;
158 template<class date_type> 157 template<class date_type>
159 date_type 158 date_type
160 parse_undelimited_date(const std::string& s) { 159 parse_undelimited_date(const std::string& s) {
161 int offsets[] = {4,2,2}; 160 int offsets[] = {4,2,2};
162 int pos = 0; 161 int pos = 0;
163 typedef typename date_type::year_type year_type;
164 //typename date_type::ymd_type ymd((year_type::min)(),1,1); 162 //typename date_type::ymd_type ymd((year_type::min)(),1,1);
165 unsigned short y = 0, m = 0, d = 0; 163 unsigned short y = 0, m = 0, d = 0;
166 164
167 /* The two bool arguments state that parsing will not wrap 165 /* The two bool arguments state that parsing will not wrap
168 * (only the first 8 characters will be parsed) and partial 166 * (only the first 8 characters will be parsed) and partial