Skip to content

Commit eb72672

Browse files
committed
updated documentation
1 parent fa72463 commit eb72672

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

docs/reference/mapping/date-format.asciidoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,17 @@ year.
200200
year, and two digit day of month.
201201
|=======================================================================
202202

203+
[float]
204+
[[strict]]
205+
=== Strict date formats
206+
207+
Most of the above dates have a `strict` companion dates, which means, that
208+
year, month and day parts of the week must have prepending zeros in order
209+
to be valid. This means, that a date like `5/11/1` would not be valid, but
210+
you would need to specify the full date, which would be `2005/11/01` in this
211+
example. So instead of `dateOptionalTime` you would need to specify
212+
`strictDateOptionalTime`.
213+
203214
[float]
204215
[[custom]]
205216
=== Custom Format

docs/reference/mapping/fields/timestamp-field.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ format>> used to parse the provided timestamp value. For example:
7979
}
8080
--------------------------------------------------
8181

82-
Note, the default format is `dateOptionalTime`. The timestamp value will
82+
Note, the default format is `strictDateOptionalTime`. The timestamp value will
8383
first be parsed as a number and if it fails the format will be tried.
8484

8585
[float]

docs/reference/mapping/types/core-types.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ date type:
349349
Defaults to the property/field name.
350350

351351
|`format` |The <<mapping-date-format,date
352-
format>>. Defaults to `dateOptionalTime`.
352+
format>>. Defaults to `strictDateOptionalTime`.
353353

354354
|`store` |Set to `true` to store actual field in the index, `false` to not
355355
store it. Defaults to `false` (note, the JSON document itself is stored,

docs/reference/mapping/types/root-object-type.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ and will use the matching format as its format attribute. The date
4242
format itself is explained
4343
<<mapping-date-format,here>>.
4444

45-
The default formats are: `dateOptionalTime` (ISO) and
45+
The default formats are: `strictDateOptionalTime` (ISO) and
4646
`yyyy/MM/dd HH:mm:ss Z||yyyy/MM/dd Z`.
4747

4848
*Note:* `dynamic_date_formats` are used *only* for dynamically added

0 commit comments

Comments
 (0)