diff --git a/Examples-and-Recipes.md b/Examples-and-Recipes.md index 14798f9..ba3b2b3 100644 --- a/Examples-and-Recipes.md +++ b/Examples-and-Recipes.md @@ -127,6 +127,26 @@ And the conversion from `day_point` back to `year_month_day` calls this algorith http://howardhinnant.github.io/date_algorithms.html#civil_from_days +Example: + + int + main() + { + using namespace date; + auto ymd = 2015_y/55/250; + std::cout << ymd << '\n'; + ymd += months{0}; + std::cout << ymd << '\n'; + ymd = day_point(ymd); + std::cout << ymd << '\n'; + } + +Outputs: + + 2015-55-94 + 2019-07-94 + 2019-10-02 + The specifications for these functions do not yet guarantee this "normalization behavior." But the implementations has been thoroughly tested for this behavior and the specification will be updated soon. ***