mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-05 13:44:26 +02:00
Updated Examples and Recipes (markdown)
@@ -320,7 +320,8 @@ This example demonstrates both some simple date arithmetic, and how to handle di
|
||||
using namespace date;
|
||||
// Dave was born April 24, 1954. 10:03 AM pst
|
||||
// Want to know when he is 2 Gigaseconds old
|
||||
auto birthday = make_zoned("America/Los_Angeles", local_days{apr/24/1954} + 10h + 3min);
|
||||
auto birthday = make_zoned("America/Los_Angeles",
|
||||
local_days{apr/24/1954} + 10h + 3min);
|
||||
std::cout << "born : " << birthday << '\n';
|
||||
birthday = birthday.get_sys_time() + 2'000'000'000s;
|
||||
std::cout << "2Gs birthday: " << birthday << '\n';
|
||||
|
Reference in New Issue
Block a user