DateTimeExpressions extension
Provides expressions to extract information from date time values, or to calculate the difference between datetimes.
- on
Properties
-
date
→ Expression<
String> -
Available on Expression<
Formats this datetime in the formatDateTime> , provided by the DateTimeExpressions extensionyear-month-day
.no setter -
datetime
→ Expression<
String> -
Available on Expression<
Formats this datetime in the formatDateTime> , provided by the DateTimeExpressions extensionyear-month-day hour:minute:second
.no setter -
day
→ Expression<
int> -
Available on Expression<
Extracts the day fromDateTime> , provided by the DateTimeExpressions extensionthis
datetime expression.no setter -
hour
→ Expression<
int> -
Available on Expression<
Extracts the hour fromDateTime> , provided by the DateTimeExpressions extensionthis
datetime expression.no setter -
julianday
→ Expression<
double> -
Available on Expression<
Formats this datetime in the Julian day format - a fractional number of days since noon in Greenwich on November 24, 4714 B.C.DateTime> , provided by the DateTimeExpressions extensionno setter -
minute
→ Expression<
int> -
Available on Expression<
Extracts the minute fromDateTime> , provided by the DateTimeExpressions extensionthis
datetime expression.no setter -
month
→ Expression<
int> -
Available on Expression<
Extracts the month fromDateTime> , provided by the DateTimeExpressions extensionthis
datetime expression.no setter -
second
→ Expression<
int> -
Available on Expression<
Extracts the second fromDateTime> , provided by the DateTimeExpressions extensionthis
datetime expression.no setter -
secondsSinceEpoch
→ Expression<
int> -
Available on Expression<
Returns an expression containing the amount of seconds from the unix epoch (January 1st, 1970) toDateTime> , provided by the DateTimeExpressions extensionthis
datetime expression.no setter -
time
→ Expression<
String> -
Available on Expression<
Formats this datetime in the formatDateTime> , provided by the DateTimeExpressions extensionhour:minute:second
.no setter -
unixepoch
→ Expression<
int> -
Available on Expression<
Formats this datetime as a unix timestamp - the number of seconds since 1970-01-01 00:00:00 UTC.DateTime> , provided by the DateTimeExpressions extensionno setter -
year
→ Expression<
int> -
Available on Expression<
Extracts the year fromDateTime> , provided by the DateTimeExpressions extensionthis
datetime expression.no setter
Methods
-
modify(
DateTimeModifier modifier) → Expression< DateTime> -
Available on Expression<
Apply a modifier that alters the date and/or time.DateTime> , provided by the DateTimeExpressions extension -
modifyAll(
Iterable< DateTimeModifier> modifiers) → Expression<DateTime> -
Available on Expression<
Applies modifiers that alters the date and/or time.DateTime> , provided by the DateTimeExpressions extension -
strftime(
String format) → Expression< String> -
Available on Expression<
Formats this datetime according to the format string specified as the first argument. The format string supports the most common substitutions found in the strftime() function from the standard C library plus two new substitutions, %f and %J. The following is a complete list of valid strftime() substitutions:DateTime> , provided by the DateTimeExpressions extension
Operators
-
operator +(
Duration duration) → Expression< DateTime> -
Available on Expression<
Adds aDateTime> , provided by the DateTimeExpressions extensionduration
to this date. -
operator -(
Duration duration) → Expression< DateTime> -
Available on Expression<
SubtractsDateTime> , provided by the DateTimeExpressions extensionduration
from this date.
Static Methods
-
fromUnixEpoch(
Expression< int> unixEpoch) → Expression<DateTime> -
Available on Expression<
Converts a numeric expressionDateTime> , provided by the DateTimeExpressions extensionunixEpoch
into a date time by interpreting it as the amount of seconds since 1970-01-01 00:00:00 UTC.