Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards


Function template operator<<

boost::gregorian::operator<< — ostream operator for gregorian::date


// In header: <boost/date_time/gregorian/greg_facet.hpp>

template<typename charT, typename traits> 
  std::basic_ostream< charT, traits > & 
  operator<<(std::basic_ostream< charT, traits > & os, const date & d);


Uses the date facet to determine various output parameters including:

  • string values for the month (eg: Jan, Feb, Mar) (default: English)

  • string values for special values (eg: not-a-date-time) (default: English)

  • selection of long, short strings, or numerical month representation (default: short string)

  • month day year order (default yyyy-mmm-dd)