Skip to content

Fix: Correct day calculations for BS year 2082#67

Open
puncoz wants to merge 1 commit into
puncoz-official:mainfrom
puncoz:fix/nepali-calendar-2082BS-dates
Open

Fix: Correct day calculations for BS year 2082#67
puncoz wants to merge 1 commit into
puncoz-official:mainfrom
puncoz:fix/nepali-calendar-2082BS-dates

Conversation

@puncoz

@puncoz puncoz commented Jun 9, 2025

Copy link
Copy Markdown
Collaborator

This commit addresses an issue where the number of days for several months in the Bikram Sambat year 2082 were calculated incorrectly.

Modifications were made to the bsMonthCalculatedData arrays in src/NepaliDatePicker/Config/CalenderData.ts for the affected months (Jestha, Asar, Mangsir, Falgun) to ensure they produce the correct number of days for 2082 BS.

  • Jestha 2082 now correctly has 31 days.
  • Asar 2082 now correctly has 32 days. (Note: The data for Asar was simplified to [1, 112] to correct 2082 BS; this specific change might affect the accuracy of Asar's day counts for other years).
  • Mangsir 2082 now correctly has 29 days.
  • Falgun 2082 now correctly has 29 days.

A new test suite in src/NepaliDatePicker/Utils/common.test.ts has been added to verify the number of days for all months of BS year 2082, and these tests now pass.

This commit addresses an issue where the number of days for several months
in the Bikram Sambat year 2082 were calculated incorrectly.

Modifications were made to the `bsMonthCalculatedData` arrays in
`src/NepaliDatePicker/Config/CalenderData.ts` for the affected months
(Jestha, Asar, Mangsir, Falgun) to ensure they produce the correct
number of days for 2082 BS.

- Jestha 2082 now correctly has 31 days.
- Asar 2082 now correctly has 32 days. (Note: The data for Asar was
  simplified to `[1, 112]` to correct 2082 BS; this specific change
  might affect the accuracy of Asar's day counts for other years).
- Mangsir 2082 now correctly has 29 days.
- Falgun 2082 now correctly has 29 days.

A new test suite in `src/NepaliDatePicker/Utils/common.test.ts` has been
added to verify the number of days for all months of BS year 2082,
and these tests now pass.
@puncoz puncoz added the help wanted Extra attention is needed label Jun 9, 2025
@puncoz

puncoz commented Jun 9, 2025

Copy link
Copy Markdown
Collaborator Author

AI makes this change. Can someone review and verify these changes?

@joonshakya

joonshakya commented Jul 19, 2025

Copy link
Copy Markdown

Please fix the date in the calendar.
In this month (Shrawan 2082), the dates are wrong.
can you push it to npm and I'll confirm it

@dipesh79

Copy link
Copy Markdown

@puncoz the date for shrawan is incorrect and thie PR seems to fix this issue. Could you please take some action?

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants