Possible Duplicate:
C++ standard date/time class
The question
How can I manage dates in C++?
By that, I mean – is there something in the standard library I can use (similar to Date/Calendar in Java), should I make my own class, or should I use some 3rd party library (îf so, which one?).
Basically, what I need is to be able to store/retrieve data related to dates (time, day, month, year, weekday) and compare date objects between them (for sorting).
What I’ve already tried
Well, I have made a simple Calendar class that mimics the behavior of Java’s Calendar class… But I’m having trouble dealing with leap years (well, that’s OK, but it messes up my week days), week days, and that kind of stuff.
I have also seen old posts (2 years+) on SO about it, but I’m wondering if there is anything more recent.
In Qt framework you found many similar Java classes.
Also you can use in wxWidgets the wxCalendarCtrl class.