Updated Examples and Recipes (markdown)

HowardHinnant
2015-08-01 21:04:11 -04:00
parent 8f1860b593
commit 2c5d1283b0

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