Skip to content

Commit e3b4c0c

Browse files
authored
Add note about optional times and epochs (#105786) (#105972)
1 parent 03dc8ed commit e3b4c0c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/reference/mapping/params/format.asciidoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ The following tables lists all the defaults ISO formats supported:
7070
(separated by `T`), is optional.
7171
Examples: `yyyy-MM-dd'T'HH:mm:ss.SSSZ` or `yyyy-MM-dd`.
7272

73+
NOTE: When using `date_optional_time`, the parsing is lenient and will attempt to parse
74+
numbers as a year (e.g. `292278994` will be parsed as a year). This can lead to unexpected results
75+
when paired with a numeric focused format like `epoch_second` and `epoch_millis`.
76+
It is recommended you use `strict_date_optional_time` when pairing with a numeric focused format.
77+
7378
[[strict-date-time-nanos]]`strict_date_optional_time_nanos`::
7479

7580
A generic ISO datetime parser, where the date must include the year at a minimum, and the time

0 commit comments

Comments
 (0)