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
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;
// %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
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);
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 + "'"));