]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/date_time/time_facet.hpp
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / boost / date_time / time_facet.hpp
index 38b2ba76395a5a0c202edcb649af1d81ee7342ce..1e07093ffcf38f4830154d17ad82ef7f85357375 100644 (file)
@@ -866,6 +866,7 @@ namespace date_time {
                     break;
                   // %s is the same as %S%f so we drop through into %f
                 }
+                /* Falls through. */
               case 'f':
                 {
                   // check for decimal, check special_values if missing
@@ -1088,9 +1089,12 @@ namespace date_time {
                     break;
                   }
                 case 'd':
+                case 'e':
                   {
                     try {
-                      t_day = this->m_parser.parse_day_of_month(sitr, stream_end);
+                      t_day = (*itr == 'd') ?
+                          this->m_parser.parse_day_of_month(sitr, stream_end) :
+                          this->m_parser.parse_var_day_of_month(sitr, stream_end);
                     }
                     catch(std::out_of_range&) { // base class for exception bad_day_of_month
                       match_results mr;
@@ -1136,6 +1140,7 @@ namespace date_time {
                     // %s is the same as %S%f so we drop through into %f if we are
                     // not at the end of the stream
                   }
+                  /* Falls through. */
                 case 'f':
                   {
                     // check for decimal, check SV if missing
@@ -1227,7 +1232,7 @@ namespace date_time {
 
         date_type d(not_a_date_time);
         if (day_of_year > 0) {
-          d = date_type(static_cast<unsigned short>(t_year-1),12,31) + date_duration_type(day_of_year);
+          d = date_type(static_cast<unsigned short>(t_year),1,1) + date_duration_type(day_of_year-1);
         }
         else {
           d = date_type(t_year, t_month, t_day);
@@ -1250,7 +1255,7 @@ namespace date_time {
         if((c == '-' || c == '+') && (*sitr != c)) { // was the first character consumed?
           mr.cache += c;
         }
-        this->m_sv_parser.match(sitr, stream_end, mr);
+        (void)this->m_sv_parser.match(sitr, stream_end, mr);
         if(mr.current_match == match_results::PARSE_ERROR) {
           std::string tmp = convert_string_type<char_type, char>(mr.cache);
           boost::throw_exception(std::ios_base::failure("Parse failed. No match found for '" + tmp + "'"));