* Many of the ideas and some of the code herein is credited to
Adrian Colomitchi
* Decouple fractional decimal seconds formatting from time_of_day
formatting so that it can be more easily used elsewhere in the
future.
* Include super-second durations such as nanocenturies and
microfortnights in the class of durations that will get formatted
with fractional decimal seconds.
* If a duration is exactly representable with fractional decimal
seconds not exceeding 18 decimal fractional digits, format it
exactly. Otherwise format it to 6 fractional decimal digits
(microseconds precision). The number 18 is chosen as this is the
limit of std::ratio using 64 bits (i.e. atto).
* The above bullet implies that durations with ratio<1, 4> will now
be formatted with 2 fractional decimal digits instead of 1.
ratio<1, 8> will be formatted with 3, and ratio<1, 3> with 6.
* Unify the implementation into one C++11 implementation that works
equally well with C++14.
* Drive-by fix a couple formatting bugs dealing with negative
durations.
* Deprecate the make_time functions taking unsigned md by removing
their documentation. Also deprecate the corresponding time_of_day
constructors taking unsigned md.
* This change paves the way for future formatting improvements.
Moved formatting and parsing of sys_time and local_time from tz.h to
date.h in order to make this functionality available to a wider
audience. Existing code does not need to change. But future code
can #include "date.h" instead of "tz.h" and need not compile tz.cpp nor
link to curl.
Formatting zoned_time remains in tz.h.
* from storing a {year, month}.
* Change constructor from {year, month} to {year, month_day_last}.
* Add getter from year_month_day_last().
* Fix up operator/() as required.
* This is an API change, but not a functionality change.
* Rationale: consistency.
* from storing a {month, weekday}.
* Change constructor from {month, weekday} to {month, week_last}.
* Change getter from weekday() to weekday_last().
* Fix up operator/() as required.
* This is an API change, but not a functionality change.
* Rationale: consistency.
This library now compiles on Windows but requires VS2015 for Windows.
VS2013 may work but this has not been tested yet.
Requires NOMINMAX to be defined to avoid clashes with the Windows.h
headers and the C++ stl and this libraries Date max functions.
Also known to work equivalently with recent g++ and mingw combinations
but -std=C++14 flag should be set.
C++14 restrictions may be relaxed later. Patches welcome!
g++ 5.1 was tested. It may work with other version but that hasn't been tried.
Mac OS and Linux systems are known to compile with -std=c++11
current_timezone and locate_zone will return iana names not windows
time zone names. This is expected and as designed.
to within the range of chrono::minutes.
* This prevents overflow when adding minutes to day_point
when minutes is stored in 32 bits.
* Also added static checks on the range of hours and seconds.
If these static checks fire, the range of year should be
further reduced.
* This does not impact gcc at all. It impacts clang only
when targeting 32 bit architectures. And it fixes
overflow on Visual Studio.
* Thanks much to https://github.com/gmcode for the herculean
effort in tracking this down.