You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| `input` | `ANY` | A map optionally containing the following keys: 'years', 'months', 'weeks', 'days', 'hours', 'minutes', 'seconds', 'milliseconds', 'microseconds', or 'nanoseconds'.
23
+
| `pattern` | `STRING` | A pattern used to parse the input. If a pattern is provided, `input` must be `STRING`.
23
24
| *Returns* 3+| `DURATION`
24
25
|===
25
26
@@ -128,6 +129,7 @@ RETURN aDuration
128
129
| If `from` has a time component and `to` does not, the time component of `to` is assumed to be midnight, and vice versa.
129
130
| If `from` has a time zone component and `to` does not, the time zone component of `to` is assumed to be the same as that of `from`, and vice versa.
130
131
| If `to` has a date component and `from` does not, the date component of `from` is assumed to be the same as that of `to`, and vice versa.
132
+
| The `pattern` parameter follows the link:https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/time/format/DateTimeFormatter.html[Java DateTimeFormatter].
| `input` | `ANY` | Either a string representation of a temporal value, a map containing the single key 'timezone', or a map containing temporal values ('date', 'year', 'month', 'day', 'week', 'dayOfWeek', 'quarter', 'dayOfQuarter', 'ordinalDay') as components.
| `input` | `ANY` | Either a string representation of a temporal value, a map containing the single key 'timezone', or a map containing temporal values ('date', 'year', 'month', 'day', 'week', 'dayOfWeek', 'quarter', 'dayOfQuarter', 'ordinalDay') as components.
339
+
| `pattern` | `STRING` | A pattern used to parse the input. If a pattern is provided, `input` must be `STRING`.
350
340
| *Returns* 3+| `DATE`
351
341
|===
352
342
353
343
354
-
355
344
.Temporal components
356
345
[options="header"]
357
346
|===
@@ -406,6 +395,7 @@ The following table lists the supported truncation units and the corresponding s
406
395
| `date(null)` returns `null`.
407
396
| If any of the optional parameters are provided, these will override the corresponding components of `date`.
408
397
| `date(dd)` may be written instead of `+date({date: dd})+`.
398
+
| The `pattern` parameter follows the link:https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/time/format/DateTimeFormatter.html[Java DateTimeFormatter].
409
399
410
400
|===
411
401
@@ -854,10 +844,11 @@ RETURN
854
844
855
845
.Details
856
846
|===
857
-
| *Syntax* 3+| `datetime([ input ])`
847
+
| *Syntax* 3+| `datetime([ input, pattern ])`
858
848
| *Description* 3+| Creates a `ZONED DATETIME` instant.
| `input` | `ANY` | Either a string representation of a temporal value, a map containing the single key 'timezone', or a map containing temporal values ('year', 'month', 'day', 'hour', 'minute', 'second', 'millisecond', 'microsecond', 'nanosecond', 'timezone') as components.
851
+
| `pattern` | `STRING` | A pattern used to parse the input. If a pattern is provided, `input` must be `STRING`.
861
852
| *Returns* 3+| `ZONED DATETIME`
862
853
|===
863
854
@@ -927,6 +918,7 @@ RETURN
927
918
| Selecting a `ZONED DATETIME` or `ZONED TIME` as the `time` component and overwriting the timezone will adjust the local time to keep the same point in time.
928
919
| `epochSeconds`/`epochMillis` may be used in conjunction with `nanosecond`.
929
920
| `datetime(null)` returns null.
921
+
| The `pattern` parameter follows the link:https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/time/format/DateTimeFormatter.html[Java DateTimeFormatter].
| `input` | `ANY` | Either a string representation of a temporal value, a map containing the single key 'timezone', or a map containing temporal values ('year', 'month', 'day', 'hour', 'minute', 'second', 'millisecond', 'microsecond', 'nanosecond') as components.
1611
+
| `pattern` | `STRING` | A pattern used to parse the input. If a pattern is provided, `input` must be `STRING`.
1619
1612
| *Returns* 3+| `LOCAL DATETIME`
1620
1613
|===
1621
1614
@@ -1674,6 +1667,7 @@ RETURN
1674
1667
| `localdatetime(null)` returns null.
1675
1668
| If any of the optional parameters are provided, these will override the corresponding components of `datetime`, `date` and/or `time`.
1676
1669
| `localdatetime(dd)` may be written instead of `+localdatetime({datetime: dd})+`.
1670
+
| The `pattern` parameter follows the link:https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/time/format/DateTimeFormatter.html[Java DateTimeFormatter].
1677
1671
1678
1672
|===
1679
1673
@@ -2192,10 +2186,11 @@ RETURN
2192
2186
2193
2187
.Details
2194
2188
|===
2195
-
| *Syntax* 3+| `localtime([ input ])`
2189
+
| *Syntax* 3+| `localtime([ input, pattern ])`
2196
2190
| *Description* 3+| Creates a `LOCAL TIME` instant.
| `input` | `ANY` | Either a string representation of a temporal value, a map containing the single key 'timezone', or a map containing temporal values ('hour, 'minute', 'second', 'millisecond', 'microsecond', 'nanosecond' as components.
2193
+
| `pattern` | `STRING` | A pattern used to parse the input. If a pattern is provided, `input` must be `STRING`.
2199
2194
| *Returns* 3+| `LOCAL TIME`
2200
2195
|===
2201
2196
@@ -2240,6 +2235,7 @@ RETURN
2240
2235
| `localtime(null)` returns null.
2241
2236
| If any of the optional parameters are provided, these will override the corresponding components of `time`.
2242
2237
| `localtime(tt)` may be written instead of `localtime({time: tt})`.
2238
+
| The `pattern` parameter follows the link:https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/time/format/DateTimeFormatter.html[Java DateTimeFormatter].
2243
2239
2244
2240
|===
2245
2241
@@ -2587,10 +2583,11 @@ RETURN
2587
2583
2588
2584
.Details
2589
2585
|===
2590
-
| *Syntax* 3+| `time([ input ])`
2586
+
| *Syntax* 3+| `time([ input, pattern ])`
2591
2587
| *Description* 3+| Creates a `ZONED TIME` instant.
| `input` | `ANY` | Either a string representation of a temporal value, a map containing the single key 'timezone', or a map containing temporal values ('hour', 'minute', 'second', 'millisecond', 'microsecond', 'nanosecond', 'timezone') as components.
2590
+
| `pattern` | `STRING` | A pattern used to parse the input. If a pattern is provided, `input` must be `STRING`.
2594
2591
| *Returns* 3+| `ZONED TIME`
2595
2592
|===
2596
2593
@@ -2642,6 +2639,7 @@ RETURN
2642
2639
| `time(tt)` may be written instead of `+time({time: tt})+`.
2643
2640
| Selecting a `ZONED TIME` or `ZONED DATETIME` value as the `time` component also selects its timezone. If a `LOCAL TIME` or `LOCAL DATETIME` is selected instead, the default timezone is used. In any case, the timezone can be overridden explicitly.
2644
2641
| Selecting a `ZONED DATETIME` or `ZONED TIME` as the `time` component and overwriting the timezone will adjust the local time to keep the same point in time.
2642
+
| The `pattern` parameter follows the link:https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/time/format/DateTimeFormatter.html[Java DateTimeFormatter].
0 commit comments