mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-07 06:34:27 +02:00
Updated Examples and Recipes (markdown)
@@ -25,6 +25,7 @@ system_clock::time_point = day_point(ymd) +
|
|||||||
|
|
||||||
```c++
|
```c++
|
||||||
using namespace date;
|
using namespace date;
|
||||||
|
auto time = std::chrono::system_clock::now();
|
||||||
auto daypoint = floor<days>(time);
|
auto daypoint = floor<days>(time);
|
||||||
auto ymd = year_month_day(daypoint); // calendar date
|
auto ymd = year_month_day(daypoint); // calendar date
|
||||||
auto tod = make_time(time - daypoint); // Yields time_of_day type
|
auto tod = make_time(time - daypoint); // Yields time_of_day type
|
||||||
|
Reference in New Issue
Block a user