Updated Boost datetime Examples Translated (markdown)

HowardHinnant
2015-09-05 16:10:37 -04:00
parent fc1b05ca73
commit 12f7dad463

@@ -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