Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# like DateTime in C++

Tags:

c++

c#

datetime

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.

like image 467
Nishanth Avatar asked Dec 27 '22 06:12

Nishanth


1 Answers

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

like image 98
user93353 Avatar answered Dec 28 '22 20:12

user93353