company logo

Date :: addMonths - Add months to date value

The number of months passed in iMonths is added to the date value. Year may change, when month exceeds 12 . Usually, day remains unchanged, but will be adjusted, when the new month value does not have the resulting day

  Date      date(31,1,2009);

  date.addMonths(1); // day becomes: 2009-28-2

Return value:  Date ( odaba::Date & )

The date contains day, month and year, but not the time.

Implementation details

odaba::Date & Date  :: addMonths ( int32 iMonths )
  • iMonths - Months

    Time span in months.