GlideDateTime - equals(Object GDT)

Compares an object with an existing value for equality.

Table 1. Parameters
Name Type Description
GDT Object The object to compare. Can be a GlideDateTIme object or a valid date time string.
Table 2. Returns
Type Description
Boolean True if they are equal, false otherwise.

Scoped equivalent

To use the equals() method in a scoped application, use the corresponding scoped method: Scoped GlideDateTime - equals(Object dateTime).

var gdt = new GlideDateTime("2011-08-31 00:00:00");
gs.print(gdt.equals("2011-09-30 00:12:01"));

Output: false