GLib.DateTime.compare

### Method

# GLib DateTimecompare

since: 2.26

#### Declaration [src]

    gint
    g_date_time_compare (
      gconstpointer dt1,
      gconstpointer dt2
    )

#### Description [src]

A comparison function for `GDateTimes` that is suitable as a `GCompareFunc`. Both `GDateTimes` must be non-`NULL`.

Available since: 2.26

#### Parameters

`dt2`

  Type: `GDateTime`

  Second `GDateTime` to compare.

#### Return value

Type: `gint`

-1, 0 or 1 if `dt1` is less than, equal to or greater than `dt2`.