Simple wrapper on std::chrono::year, with some helpful validation properties (assures constructed 'ok'). But not necessary to use - use just 'year' in most places.
More...
#include <Date.h>
Inherits year.
|
static constexpr year | eFirstYear {-4712} |
| 4713 BC (no year zero)
|
|
static constexpr year | eLastYear {8099} |
|
Simple wrapper on std::chrono::year, with some helpful validation properties (assures constructed 'ok'). But not necessary to use - use just 'year' in most places.
- Note
- - Year was an enum in Stroika v2.1, so this is a significant change.
-
Year can be converted from/to signed int.
-
you can use the suffix y instead of Year{N} (assuming using namespace Foundation::Time).
-
not [[nodiscard]] cuz can use CTOR just for quiet validation
Definition at line 215 of file Date.h.
◆ eFirstYear
constexpr year Stroika::Foundation::Time::Year::eFirstYear {-4712} |
|
staticconstexpr |
4713 BC (no year zero)
Was 1752 in Stroika v2.1
Definition at line 227 of file Date.h.
◆ eLastYear
constexpr year Stroika::Foundation::Time::Year::eLastYear {8099} |
|
staticconstexpr |
Reason for current max-date: C:\Program Files (x86)\Windows Kits\10\Source\10.0.22000.0\ucrt\time\wcsftime.cpp _VALIDATE_RETURN(timeptr->tm_year >= -1900 && timeptr->tm_year <= 8099, EINVAL, false); – LGP 2022-11-09 Was SHRT_MAX - 1 in Stroika v2.1
Definition at line 237 of file Date.h.
The documentation for this struct was generated from the following files: