public class DateFunction extends Object implements TemporalFunction<Date>
TemporalFunction to wrap Date objects.| Modifier and Type | Field and Description |
|---|---|
static String |
JAVA_SQL_DATE_UNIT |
| Constructor and Description |
|---|
DateFunction() |
| Modifier and Type | Method and Description |
|---|---|
String |
describe(Date temporal,
Locale locale)
Describe a temporal type
|
Interval |
interval(Date expected,
Date actual,
ChronoUnit unit)
Return the interval between two temporals
|
boolean |
isAfter(Date expected,
Date actual)
Test if a temporal is after another temporal
|
boolean |
isBefore(Date expected,
Date actual)
Test if a temporal is before another temporal
|
boolean |
isSame(Date expected,
Date actual)
Test if a temporal is the same as another temporal
|
public static final String JAVA_SQL_DATE_UNIT
public boolean isAfter(Date expected, Date actual)
TemporalFunctionisAfter in interface TemporalFunction<Date>expected - the temporal to test foractual - the temporal to test againstpublic boolean isBefore(Date expected, Date actual)
TemporalFunctionisBefore in interface TemporalFunction<Date>expected - the temporal to test foractual - the temporal to test againstpublic boolean isSame(Date expected, Date actual)
TemporalFunctionisSame in interface TemporalFunction<Date>expected - the temporal to test foractual - the temporal to test againstpublic Interval interval(Date expected, Date actual, ChronoUnit unit)
TemporalFunctioninterval in interface TemporalFunction<Date>expected - the temporal to test foractual - the temporal to test againstunit - the unit to measure the interval inIntervalpublic String describe(Date temporal, Locale locale)
TemporalFunctiondescribe in interface TemporalFunction<Date>temporal - the temporal instance to describelocale - the locale to describe the temporal inCopyright © 2021 eXparity Limited. All rights reserved.