Namespaces
Variants
Actions

Talk:cpp/chrono/year month day

From cppreference.com

In the code sample std::chrono::floor links to http://en.cppreference.com/w/cpp/chrono/duration/floor but I believe it should link to https://en.cppreference.com/w/cpp/chrono/time_point/floor. I don't know how to make that edit.

[edit] Isn't operator / overloaded?

The example at https://en.cppreference.com/w/cpp/chrono/year_month_day/operator_cmp uses the code

constexpr auto ymd1 {std::chrono::day(1)/7/2021}; constexpr auto ymd2 {std::chrono::year(2021)/7/1};

where / looks like a division but seems it should act like a separator. In order to achieve this, the / operator must be overloaded, right? --5.158.162.136 09:33, 3 November 2022 (PDT)

Correct --Ybab321 (talk) 11:17, 3 November 2022 (PDT)