Updated Boost datetime Examples Translated (markdown)

Howard Hinnant
2017-07-07 21:30:06 -04:00
parent 867af4cfb2
commit 4a9dd9c49b

@@ -457,27 +457,27 @@ an example using the IANA timezone database see the [Local to UTC Conversion](#L
<a name="Daylight_Savings_Calc_Rules"></a>
### Daylight Savings Calc Rules
```c++
// This library does not support custom daylight savings rules. But it
// does support the notion of partial dates and finding the nth (or last)
// weekday of a month.
// This library does not support custom daylight savings rules. But it
// does support the notion of partial dates and finding the nth (or last)
// weekday of a month.
#include "date.h"
int
main()
{
using namespace date;
auto fd_start = sun[1]/may;
auto ld_start = sun[last]/may;
auto nkd_start = sun[3]/may;
auto pd_start = may/1;
auto fd_end = sun[1]/oct;
auto ld_end = sun[last]/oct;
auto nkd_end = sun[3]/oct;
auto pd_end = oct/31;
}
#include "date.h"
int
main()
{
using namespace date::literals;
auto fd_start = sun[1]/may;
auto ld_start = sun[last]/may;
auto nkd_start = sun[3]/may;
auto pd_start = may/1;
auto fd_end = sun[1]/oct;
auto ld_end = sun[last]/oct;
auto nkd_end = sun[3]/oct;
auto pd_end = oct/31;
}
```
<a name="Flight_Time_Example"></a>
### Flight Time Example