std::chrono::operator<<(std::chrono::year_month_weekday) (3) - Linux Manuals

std::chrono::operator<<(std::chrono::year_month_weekday): std::chrono::operator<<(std::chrono::year_month_weekday)

NAME

std::chrono::operator<<(std::chrono::year_month_weekday) - std::chrono::operator<<(std::chrono::year_month_weekday)

Synopsis


template <class CharT, class Traits>
std::basic_ostream<CharT, Traits>& (since C++20)
operator<<(std::basic_ostream<CharT, Traits>& os,
const std::chrono::year_month_weekday& ymwd);


Outputs a textual representation of ymwd into os, as if by os << ymwd.year() << '/' << ymwd.month() << '/' << ymwdl.weekday_indexed();

Return value


os.

Notes


This operator<< is primarily intended for debugging use. When used with non-default stream flags, the output may be surprising:


  using namespace std::chrono;
  auto ymwd = 2001y/2/Tuesday[1];
  std::cout.width(10);
  std::cout.fill('-');
  std::cout << std::left << ymwd; // may output "2001------/Feb/Tue[1]"