mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-05 21:54:27 +02:00
Updated Boost datetime Examples Translated (markdown)
@@ -462,7 +462,8 @@ look if ported to this library.
|
||||
auto t = d + 3h + 5s; //an arbitray time on that day
|
||||
if (d <= t && t < d + days{1})
|
||||
std::cout << d << " contains " << t << '\n';
|
||||
// Time periods not part of this library but can be built from a pair of time_points.
|
||||
// Time periods not part of this library but can be built
|
||||
// from a pair of time_points.
|
||||
}
|
||||
|
||||
<a name="Simple_Time_Zones"></a>
|
||||
@@ -523,9 +524,11 @@ an example using the IANA timezone database see the [Local to UTC Conversion](#L
|
||||
auto nyc_arrival = nyc_tz->to_local(utc_arrival);
|
||||
|
||||
std::cout << "departure phx time: " << phx_departure << '\n';
|
||||
std::cout << "arrival phx time: " << floor<minutes>(phx_arrival.first)
|
||||
std::cout << "arrival phx time: "
|
||||
<< floor<minutes>(phx_arrival.first)
|
||||
<< ' ' << phx_arrival.second << '\n';
|
||||
std::cout << "arrival nyc time: " << floor<minutes>(nyc_arrival.first)
|
||||
std::cout << "arrival nyc time: "
|
||||
<< floor<minutes>(nyc_arrival.first)
|
||||
<< ' ' << nyc_arrival.second << '\n';
|
||||
}
|
||||
|
||||
@@ -537,7 +540,8 @@ an example using the IANA timezone database see the [Local to UTC Conversion](#L
|
||||
//
|
||||
// Note that boost states a nyc_arrival time of 2005-Mar-31 06:30:00 EDT
|
||||
// because boost uses the current US daylightsavings rules as opposed to
|
||||
// those that were in effect in 2005. This library varies its DST rules with the date.
|
||||
// those that were in effect in 2005. This library varies its DST rules
|
||||
// with the date.
|
||||
|
||||
<a name="Seconds_Since_Epoch"></a>
|
||||
###Seconds Since Epoch
|
||||
|
Reference in New Issue
Block a user