GLib.Date.prototype.clamp

function clamp(min_date: GLib.Date, max_date: GLib.Date): void {
    // Gjs wrapper for g_date_clamp()
}
  

If date is prior to min_date, sets date equal to min_date. If date falls after max_date, sets date equal to max_date. Otherwise, date is unchanged. Either of min_date and max_date may be null. All non-null dates must be valid.

min_date

minimum accepted value for date

max_date

maximum accepted value for date