Skip to content
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

Replace dayOfMonth with day and monthNumber with month #387

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dkhalanskyjb
Copy link
Collaborator

@dkhalanskyjb dkhalanskyjb commented Apr 19, 2024

monthNumber is still called that in the formatting facilities to distinguish monthNumber from monthName, and also in DateTimeComponents because monthNumber can contain out-of-bounds data and is useful even aside from being a view of Month.

Fixes #84

@dkhalanskyjb dkhalanskyjb force-pushed the rename-dayOfMonth-and-monthNumber branch 2 times, most recently from a07cb8d to 8885ea5 Compare May 27, 2024 08:27
@dkhalanskyjb dkhalanskyjb marked this pull request as ready for review May 27, 2024 09:51
@dkhalanskyjb dkhalanskyjb requested a review from ilya-g July 19, 2024 12:57
@dkhalanskyjb dkhalanskyjb force-pushed the rename-dayOfMonth-and-monthNumber branch from e735f90 to d9fcdb9 Compare November 14, 2024 11:51
`monthNumber` is still called that in the formatting facilities
to distinguish `monthNumber` from `monthName`, and also in
`DateTimeComponents` because `monthNumber` can contain
out-of-bounds data and is useful even aside from being a view of
`Month`.

Fixes #84
@dkhalanskyjb dkhalanskyjb force-pushed the rename-dayOfMonth-and-monthNumber branch from d9fcdb9 to 4548e85 Compare November 14, 2024 13:19
@dkhalanskyjb
Copy link
Collaborator Author

With IntelliJ IDEA 2024.2.4, typing date.dayOfMonth and accepting the replacement suggestion from the IDE will erase dayOfMonth (see https://youtrack.jetbrains.com/issue/KTIJ-29647), but I didn't manage to break any realistic code with it. Whenever dayOfMonth is actually assigned to a variable, passed to a function, or has a method call performed on it, dayOfMonth will be correctly replaced with day. I think we can simply proceed with this the usual way, despite the IDE behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simplify LocalDate(Time) constructor parameter names
1 participant