OutItrT put(OutItrT next, std::ios_base& a_ios, char_type fill_char, const date_type& d) const { if (d.is_special()) { return do_put_special(next, a_ios, fill_char, d.as_special()); } //The following line of code required the date to support a to_tm function return do_put_tm(next, a_ios, fill_char, to_tm(d), m_format); }
//! Put date into an ostream static void date_put(const date_type& d, ostream_type& os, const facet_type& f) { special_values sv = d.as_special(); if (sv == not_special) { ymd_type ymd = d.year_month_day(); ostream_ymd_formatter<ymd_type, facet_type, charT>::ymd_put(ymd, os, f); } else { // output a special value std::ostreambuf_iterator<charT> coi(os); f.put_special_value(coi, sv); } }