-
Notifications
You must be signed in to change notification settings - Fork 354
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
fix: Nepali calendar support #19438
base: 2.40
Are you sure you want to change the base?
fix: Nepali calendar support #19438
Conversation
abyot
commented
Dec 11, 2024
- ISO period names should match Nepali calendar. Baisakh 2081 is 208101 not 202404
- Fix to weekly periods start and end dates
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.
Thanks for the changes @abyot, I left some questions and suggestions.
Please, take a look... thanks!
/* | ||
* https://en.m.wikipedia.org/wiki/ISO_week_date | ||
*/ | ||
int week = (10 + getDayOfYear(dateTimeUnit) - isoWeekday(dateTimeUnit)) / 7; |
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.
Could you add constants to the integers here?
Also, a Javadoc would be nice. The Wikipedia website can be left as a reference.
toIso(dateTimeUnit).toJodaDateTime(ISOChronology.getInstance(DateTimeZone.getDefault())); | ||
return dateTime.getDayOfWeek(); | ||
/* | ||
* calculating week day from calendar dateTimeUnit is best managed |
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.
* calculating week day from calendar dateTimeUnit is best managed | |
* Calculating week day from calendar dateTimeUnit is best managed |
@@ -475,6 +500,39 @@ private DateInterval toDayIsoInterval(DateTimeUnit dateTimeUnit, int offset, int | |||
private static final Map<Integer, int[]> CONVERSION_MAP = new HashMap<>(); |
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.
Can you add a comment, so we know until which year this is valid?
I belive that at some point we need to add more elements to the map...?
Quality Gate passedIssues Measures |