Lucee object methods reference
Object Method Datetime.compare
Compares to date, to the given optional resolution. Returns -1 if date1 is before date2. Returns 1 if date1 is after date2. Returns 0 if equal
Datetime.compare(datetime date2,[string datePart]):number
Arguments
The arguments for this function are set. You can not use other arguments except the following ones.
Name | Type | Required | Default Value | Description |
---|---|---|---|---|
date2 | datetime | Yes | datetime object | |
datePart | string | No | s |
Precision of the comparison: |