std::chrono::operator<<(std::chrono::month)

Header: <chrono>

If !m.ok(), inserts unsigned(m) followed by " is not a valid month" to os. Otherwise, forms a std::basic_string s consisting of the abbreviated month name for the month represented by m, determined using the locale associated with os, and inserts s into os.

# Declarations

template< class CharT, class Traits >
std::basic_ostream<CharT, Traits>&
operator<<( std::basic_ostream<CharT, Traits>& os, const std::chrono::month& m );

(since C++20)

# Return value

os

# Notes

This operator« is primarily intended for debugging use. For control over formatting, use std::format.

# Defect reports

DRApplied toBehavior as publishedCorrect behavior
P2372R3C++20the given locale was used by defaultL is needed to use the given locale

# See also