C# like DateTime in C++

c#, c++, datetime

Solution

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

Problem

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.

Original source

Related problems