A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../algorithm/../../cpp/../cpp/chrono/weekday.html below:

std::chrono::weekday - cppreference.com

class weekday;

(since C++20)

inline constexpr std::chrono::weekday Sunday{0};

(since C++20)

inline constexpr std::chrono::weekday Monday{1};

(since C++20)

inline constexpr std::chrono::weekday Tuesday{2};

(since C++20)

inline constexpr std::chrono::weekday Wednesday{3};

(since C++20)

inline constexpr std::chrono::weekday Thursday{4};

(since C++20)

inline constexpr std::chrono::weekday Friday{5};

(since C++20)

inline constexpr std::chrono::weekday Saturday{6};

(since C++20)

The class weekday represent a day of the week in the proleptic Gregorian calendar. Its normal range is [​0​6], for Sunday through Saturday, but it can hold any value in the range [​0​255]. Seven named constants are predefined in the std::chrono namespace for the seven days of the week.

weekday is a TriviallyCopyable StandardLayoutType.

[edit] Member functions [edit] Nonmember functions [edit] Helper classes [edit] Example
#include <chrono>
#include <iostream>
 
int main()
{
    std::chrono::weekday x{42 / 13};
    std::cout << x++ << '\n';
    std::cout << x << '\n';
    std::cout << ++x << '\n';
}

Output:

[edit] See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4