Daily bit(e) of C++ | std::chrono — working with pseudo-dates

Daily bit(e) of C++ #75, The C++20 support for pseudo-dates in the std::chrono library.

When working with dates, it is often convenient to refer to pseudo-dates, such as the last day in March or the second Friday in April.

The C++20 extension to std::chrono which introduced date manipulation also added support for these constructs.

Open the example in Compiler Explorer.

--

--

I'm an ex-Software Engineer and ex-Researcher focusing on providing free educational content.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Šimon Tóth

I'm an ex-Software Engineer and ex-Researcher focusing on providing free educational content.