This paper fully documents a date and time library for use with C++11 and C++14.
Library documentation:
by Howard Hinnant
From the article:
Implementation
This entire library is implemented in a single header: date.h and is open source (with generous open source terms — not generous enough? Contact me, I'm flexible).
It uses the algorithms from chrono-Compatible Low-Level Date Algorithms. If you want detailed explanations of the algorithms, go there.
It performs best with C++14, which has vastly improved constexpr rules. However, the library will auto-adopt to C++11, sacrificing several constexpr declarations. In C++11, this will effectively transfer some computations that should be done at compile-time to run-time. Porting to C++98/03 has not been attempted.
Overview
This library builds date and date/time support on top of the <chrono> library. However it does not support timezones nor leap seconds. A separate library is provided, built on top of this one, for timezone and leap second support. Thus you only pay for such support if you need it.
Add a Comment
Comments are closed.