GLib.DateTime.prototype.add_hours

function add_hours(hours: Number(gint)): GLib.DateTime {
    // Gjs wrapper for g_date_time_add_hours()
}
  

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

Since 2.26

hours

the number of hours to add

Returns

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