GLib.DateTime.prototype.add_months

function add_months(months: Number(gint)): GLib.DateTime {
    // Gjs wrapper for g_date_time_add_months()
}
  

Creates a copy of datetime and adds the specified number of months to the copy. Add negative values to subtract months.

Since 2.26

months

the number of months

Returns

the newly created GLib.DateTime which should be freed with GLib.DateTime.prototype.unref.