I am sure that this kind of questions must have been asked before, but failed to find anything by searching this site. My apologies in advance if I missed any similar questions.
Is there anything in C++ that just does date manipulation at all? I am aware of SYSTEMTIME structure (it is the structure returned when you do GetSystemTime I think) but it does not seem to contain any manipulation functions. For example, I am looking at something which can do "give me the day of the second Tuesday in July 2010". Also, fitting a time not sourced from the system clock into a SYSTEMTIME structure just seems, well, wrong.
Is there any library routine to validate a date at all? I am not thinking about the basic "check day is between 1 and 28". The routine must be able to say that 29-02-2009 does not exist, for example.
Thank you.
You should check out Boost::DateTime.
But to answer your question there is no date time 'handling' as such in C++
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