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.
This is actually two separate C++11/C++14 libraries:
-
"date.h"is a header-only library which builds upon<chrono>. It adds some newdurationtypes, and newtime_pointtypes. It also adds "field" types such asyear_month_daywhich is a struct{year, month, day}. And it provides convenient means to convert between the "field" types and thetime_pointtypes. See http://howardhinnant.github.io/date_v2.html for more details. -
The other files are a timezone library built on top of the
"date.h"library. This timezone library is a complete parser of the IANA timezone database. It provides for an easy way to access all of the data in this database, using the types from"date.h"and<chrono>. The IANA database also includes data on leap seconds, and this library provides utilities to compute with that information as well. See http://howardhinnant.github.io/tz.html for more details.