From 4a9dd9c49b8ffd3051c3eb80c4a36306b866ebda Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Fri, 7 Jul 2017 21:30:06 -0400 Subject: [PATCH] Updated Boost datetime Examples Translated (markdown) --- Boost-datetime-Examples-Translated.md | 38 +++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Boost-datetime-Examples-Translated.md b/Boost-datetime-Examples-Translated.md index 57e8372..502ac84 100644 --- a/Boost-datetime-Examples-Translated.md +++ b/Boost-datetime-Examples-Translated.md @@ -457,27 +457,27 @@ an example using the IANA timezone database see the [Local to UTC Conversion](#L ### 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; +} +``` ### Flight Time Example