Class DateFromParts
java.lang.Object
dev.morphia.aggregation.expressions.impls.Expression
dev.morphia.aggregation.expressions.impls.DateFromParts
Constructs and returns a Date object given the date’s constituent properties.
-
Method Summary
Modifier and TypeMethodDescriptionDay of month.Can be any expression that evaluates to a number.isoDayOfWeek
(Object value) Day of week (Monday 1 - Sunday 7).Week of year.isoWeekYear
(Object value) ISO Week Date Year.millisecond
(Object value) Can be any expression that evaluates to a number.Can be any expression that evaluates to a number.Can be any expression that evaluates to a number.Can be any expression that evaluates to a number.Can be any expression that evaluates to a string whose value is either: an Olson Timezone Identifier, such as "Europe/London" or "America/New_York", or a UTC offset in the form: +/-[hh]:[mm], e.g. "+04:45", or +/-[hh][mm], e.g. "-0530", or +/-[hh], e.g. "+03".Calendar year.
-
Method Details
-
day
Day of month. Can be any expression that evaluates to a number.Optional. Can only be used with year.
- Parameters:
value
- the value to use- Returns:
- this
-
hour
Can be any expression that evaluates to a number.Optional
- Parameters:
value
- the value to use- Returns:
- this
-
isoDayOfWeek
Day of week (Monday 1 - Sunday 7). Can be any expression that evaluates to a number.- Parameters:
value
- the value to use- Returns:
- this
-
isoWeek
Week of year. Can be any expression that evaluates to a number.Optional. Can only be used with isoWeekYear.
- Parameters:
value
- the value to use- Returns:
- this
-
isoWeekYear
ISO Week Date Year. Can be any expression that evaluates to a number.Required if not using year.
- Parameters:
value
- the value to use- Returns:
- this
-
millisecond
Can be any expression that evaluates to a number.Optional
- Parameters:
value
- the value to use- Returns:
- this
-
minute
Can be any expression that evaluates to a number.Optional
- Parameters:
value
- the value to use- Returns:
- this
-
month
Can be any expression that evaluates to a number.Optional. Can only be used with year.
- Parameters:
value
- the value to use- Returns:
- this
-
second
Can be any expression that evaluates to a number.Optional
- Parameters:
value
- the value to use- Returns:
- this
-
timezone
Can be any expression that evaluates to a string whose value is either:- an Olson Timezone Identifier, such as "Europe/London" or "America/New_York", or
- a UTC offset in the form:
- +/-[hh]:[mm], e.g. "+04:45", or
- +/-[hh][mm], e.g. "-0530", or
- +/-[hh], e.g. "+03".
Optional
- Parameters:
value
- the timezone- Returns:
- this
-
year
Calendar year. Can be any expression that evaluates to a number.Required if not using isoWeekYear.
- Parameters:
value
- the value to use- Returns:
- this
-