What is the alternative for C# DateTime
class in C++? I am looking for an underlying calender with support for incrementing hours, days or weeks. It should also support comparison of dates.
C++ doesn't have a date/time class in the standard library. But you can use Boost -
http://www.boost.org/doc/libs/1_40_0/doc/html/date_time.html
http://www.boost.org/doc/libs/1_40_0/doc/html/date_time/date_time_io.html#date_time.io_tutorial
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With