std::chrono::day(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸŽ€ NAME πŸŽ€

std::chrono::day β€” std::chrono::day. This is the std::chrono::day(3) page from the C++ Standard Libary (yes, that spelling is straight from the header, don't come for me 😭), and it's literally the class for one day in a month. πŸ’…

✨ Synopsis ✨

Defined in header <chrono>
class day;                  (since C++20)

okay so day represents a day in a month. Its normal range is [1, 31], but it may hold any number in [0, 255]. Yes, bestie, it can technically hold numbers outside the normal range β€” that's the tea. β˜•

day is a TriviallyCopyable StandardLayoutType. Slay.

πŸ’– Member functions πŸ’–

  • constructor β€” constructs a day (public member function)
  • operator++, operator++(int), operator--, operator--(int) β€” increments or decrements the day (public member function)
  • operator+=, operator-= β€” adds or subtracts a number of days (public member function)
  • operator unsigned β€” retrieves the stored day value (public member function)
  • ok β€” checks if the stored day value is in the normal range (public member function)

πŸ”₯ Nonmember functions πŸ”₯

  • operator==, operator<=> (C++20) β€” compares two day values (function)
  • operator+, operator- (C++20) β€” adds or subtracts a number of days and a day, or find the difference between two days (function)
  • operator<< (C++20) β€” outputs a day into a stream (function template)
  • from_stream (C++20) β€” parses a day from a stream according to the provided format (function template)

πŸ¦‹ Helper classes πŸ¦‹

  • std::formatter<std::chrono::day> (C++20) β€” formatting support for day (class template specialization)
  • std::hash<std::chrono::day> (C++26) β€” hash support for std::chrono::day (class template specialization)

🌈 Literals 🌈

Defined in inline namespace std::literals::chrono_literals.

  • operator""d (C++20) β€” a std::chrono::day literal representing a day of a month (function)

That's the whole page, bestie 🫢 Source/version: http://cppreference.com Β· date: 2024.06.10 Β· page: std::chrono::day(3) β€” go off πŸ‘‘πŸ’–

πŸ“¦ where this page comes from