Skip to content

Latest commit

 

History

History
51 lines (39 loc) · 1.05 KB

File metadata and controls

51 lines (39 loc) · 1.05 KB

weekday

  • chrono[meta header]
  • std::chrono[meta namespace]
  • weekday_indexed[meta class]
  • function[meta id-type]
  • cpp20[meta cpp]
constexpr chrono::weekday weekday() const noexcept; // (1) C++20
  • chrono::weekday[link /reference/chrono/weekday.md]

概要

曜日を取得する。

戻り値

コンストラクタで設定されて保持しているweekday型オブジェクトを返す。

#include <cassert>
#include <chrono>

namespace chrono = std::chrono;

int main()
{
  chrono::weekday_indexed wi = chrono::Sunday[1];
  chrono::weekday w = wi.weekday();

  assert(w == chrono::Sunday);
}
  • weekday()[color ff0000]
  • chrono::weekday[link /reference/chrono/weekday.md]
  • chrono::Sunday[link /reference/chrono/weekday_constants.md]

出力

バージョン

言語

  • C++20

処理系

  • Clang: 8.0 [mark verified]
  • GCC: 9.2 [mark noimpl]
  • Visual C++: 2019 Update 3 [mark noimpl]