-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use weekyear for consistency #60707
Use weekyear for consistency #60707
Conversation
Relates: elastic#60044 and elastic#59555 (review) With the removal of camel case format names, the format name for `WEEK_YEAR` has been set to `week_year`, but this is inconsistent with the usage in other formats related to weekyear e.g. ``` WEEKYEAR_WEEK("weekyear_week"), WEEKYEAR_WEEK_DAY("weekyear_week_day"), ``` This commit - replaces the snakecase format `week_year` with `weekyear` - renames enum constants from `WEEK_YEAR` to `WEEKYEAR` for consistency with other constants related to weekyear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but would love @pgomulka to confirm.
Relates: elastic#60707 With the deprecation of camel case names in elastic#59555, the format "weekyear" was deprecated in favour of "week_year". This is inconsistent with other weekyear formats however, that use "weekyear", for example ``` WEEKYEAR_WEEK("weekyear_week"), WEEKYEAR_WEEK_DAY("weekyear_week_day"), ``` This commit keeps "weekyear" as the snake case name for the enum constant FormatNames.WEEK_YEAR. In addition, the format for DateFormatter WEEK_YEAR is changed to "weekyear".
This looks fine, but we should first have a PR to add the deprecation. It should go through the master branch first, and be backported, then this change can apply to master only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks good to me, but I wonder if we should add a WEEKYEAR in 7.x, deprecate WEEK_YEAR in 7.x and remove WEEK_YEAR in master?
#60855 (review)
week_year is misleading as the formatter only has a weekyear. A field corresponsing to 'Y'. 'weekyear' should be used instead relates elastic#60707
week_year is misleading as the formatter only has a weekyear. A field corresponsing to 'Y'. 'weekyear' should be used instead relates elastic#60707
week_year is misleading as the formatter only has a weekyear. A field corresponding to 'Y'. 'weekyear' should be used instead relates #60707
week_year is replaced by weekyear. This is a single field YYYY date format. relates elastic#60707
closing in favour of #63384 |
Relates: #60044 and #59555 (review)
With the removal of camel case format names,
the format name for
WEEK_YEAR
has been setto
"week_year"
, but this is inconsistent with the usagein other formats related to weekyear e.g.
This PR
"week_year"
with"weekyear"
WEEK_YEAR
toWEEKYEAR
for consistencywith other constants related to weekyear.
I can open another PR to address the deprecation change in 7.x/7.9 related to #59555