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

std::chrono::operator<<(std::chrono::month_day): std::chrono::operator<<(std::chrono::month_day)

NAME

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

Synopsis


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


Outputs a textual representation of md into the stream os, as if by os << md.month() << '/' << md.day().

Return value


os.

Notes


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


  auto md = std::chrono::February/1;
  std::cout.width(10);
  std::cout.fill('-');
  std::cout << std::left << md; // may output "Feb-------/01"


For control over formatting, use std::chrono::format.