Quote:
But here months are hardcoded but every year number of days may vary right?
Just February days may vary, anyway the posted code correctly handles it.
As an alternative, you could also add a day to your
COleDateTime
object (using a 1-day
COleDateTimeSpan
object) and see if there is a month change.