Skip to content

[8.5] Fix date rounding for date math parsing (#90458)#90633

Merged
pgomulka merged 1 commit intoelastic:8.5from
pgomulka:backport/8.5/pr-90458
Oct 4, 2022
Merged

[8.5] Fix date rounding for date math parsing (#90458)#90633
pgomulka merged 1 commit intoelastic:8.5from
pgomulka:backport/8.5/pr-90458

Conversation

@pgomulka
Copy link
Copy Markdown
Contributor

@pgomulka pgomulka commented Oct 4, 2022

Backport

This will backport the following commits from main to 8.5:

Questions ?

Please refer to the Backport tool documentation

in elastic#89693 the rounding logic was only applied when a field was present on a pattern. This is incorrect as for dates like "2020" we want to default to "2020-01-01T23:59:59.999..." when rounding is enabled.

This commit always applies monthOfYear or dayofMonth defaulting (when rounding enabled) except when the dayOfYear is set
closes elastic#90187

(cherry picked from commit 3f3a95e)
@pgomulka pgomulka merged commit 917bca3 into elastic:8.5 Oct 4, 2022
pgomulka added a commit to pgomulka/elasticsearch that referenced this pull request Oct 13, 2022
…tic#90633)

in elastic#89693 the rounding logic was only applied when a field was present on a pattern. This is incorrect as for dates like "2020" we want to default to "2020-01-01T23:59:59.999..." when rounding is enabled.

This commit always applies monthOfYear or dayofMonth defaulting (when rounding enabled) except when the dayOfYear is set
closes elastic#90187

backports elastic#90458
@csoulios csoulios added v8.5.0 and removed v8.5.1 labels Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants