DateTime.compare

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

class DateTime
static
int
compare

Parameters

dt1 DateTime

first #GDateTime to compare

dt2 DateTime

second #GDateTime to compare

Return Value

Type: int

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

Meta

Since

2.26