# std::chrono::operator<< (std::chrono::year_month_weekday_last)

From cppreference.com
< cpp‎ | chrono‎ | year month weekday last

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

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

### 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 ymwdl = 2001y/2/Tuesday[last];
    std::cout.width(10);
    std::cout.fill('-');
    std::cout << std::left << ymwdl; // may output "2001------/Feb/Tue[last]"

Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/chrono/year_month_weekday_last/operator_ltlt&oldid=104834"