GLib.Date.clamp

### Method

# GLib Dateclamp

#### Declaration [src]

    void
    g_date_clamp (
      GDate* date,
      const GDate* min_date,
      const GDate* max_date
    )

#### Description [src]

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.

#### Parameters

`min_date`

  Type: `GDate`

  Minimum accepted value for `date`.

  The data is owned by the caller of the method.

`max_date`

  Type: `GDate`

  Maximum accepted value for `date`.

  The data is owned by the caller of the method.