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