company logo

DateTime :: subtractMonths - Subtract month from date value

The number of months passed in iMonths is subtracted from the date value. Year may change, when month becomes less than 1 . Usually, day remains unchanged, but will be adjusted, when the new month value does not have the resulting day

  Date      date(31,3,2009);

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

Return value:  Time stamp ( odaba::DateTime & )

A time stamp combines date and time

Implementation details

odaba::DateTime & DateTime  :: subtractMonths ( int32 iMonths )
  • iMonths - Months

    Time span in months.