I'm looking for c++ type and functions to work with "days".
In particular I need to:
I don't need:
I can use c++11, what can you recommend?
C++ has always stayed away from implementing a standard date library.
They are, in general, very hard to implement and standardise. ISO8601 provides some guidance but issues such as leap-seconds, and unusual calendars (eg Ethiopia) will always be tricky areas.
Boost (www.boost.org) certainly makes inroads. Refer to their date-time library. Unfortunately it's quite heavyweight and the build process takes a while to get used to, but worth attempting.
(As an aside, Java have attempted it but the date time library in Java is widely considered to be broken).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.