Ticket #1674: boost_date_time_date_formatting_hpp.patch

File boost_date_time_date_formatting_hpp.patch, 595 bytes (added by anonymous, 15 years ago)
  • boost/date_time/date_formatting.hpp

    old new  
    7979    {
    8080      typedef typename ymd_type::month_type month_type;
    8181      std::basic_ostringstream<charT> ss;
     82
     83      // Temporarily switch to classic locale to prevent possible formatting
     84      // of year with comma or other character (for example 2,008).
     85      ss.imbue(std::locale::classic());
    8286      ss << ymd.year;
     87      ss.imbue(std::locale::locale());
     88
    8389      if (format_type::has_date_sep_chars()) {
    8490        ss << format_type::month_sep_char();
    8591      }