mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-05 21:54:27 +02:00
Updated Examples and Recipes (markdown)
@@ -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.
|
||||
|
||||
***
|
||||
|
Reference in New Issue
Block a user