A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://en.cppreference.com/w/cpp/string/basic_string/../../../cpp/chrono/year/operator_arith_2.html below:

std::chrono::operator+, std::chrono::operator- (std::chrono::year) - cppreference.com

1,2) Adds ys.count() years to y.

3) Subtracts ys.count() years from y.

4) Returns the difference in years between y1 and y2.

[edit] Return value [edit] Notes

If the resulting year value for (1-3) is outside the range [-3276732767], the actual value stored is unspecified.

The result of subtracting two year values is a duration of type std::chrono::years. This duration unit represents the length of the average Gregorian year, and the resulting duration bears no relationship to the number of days in the particular years represented by the operands. For example, the result of 2018y - 2017y is std::chrono::years(1), which represents 365.2425 days, not 365 days.

[edit] Example [edit] See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4