Hello everyone, i write mostly in java but have recently started picking up c and c++, and i was wondering if there was an equivalent to the java date class in c++ or c? I've searched for a date.h and came up empty.

Re: Equivalent to the java date class in c++ or c 80 80

The standard library equivalent can be found in the <time.h> header (or <ctime> for C++). But being used to Java's Date and Calendar classes, you'll probably find the interface either quaint or woefully inadequate.

p.s. I fairly recently posted a code snippet for for the beginnings of a date_time class that may be closer to what you're used to.

Re: Equivalent to the java date class in c++ or c 80 80

Thank you, yes <time.h> was what i was hoping for, it might not have everything Date does, but it still gives you the basics to work with, more than enough for me.

ps: the response time was amazing. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.