DateTimeModifier.months constructor

const DateTimeModifier.months(
  1. int months

Adds or subtracts months months from this date time value.

Note that this works by rendering the original date into the YYYY-MM-DD format, adding the months value to the MM field and normalizing the result. Thus, for example, the date 2001-03-31 modified by '+1 month' nitially yields 2001-04-31, but April only has 30 days so the date is normalized to 2001-05-01.


const DateTimeModifier.months(int months) : this._('$months months');