Skip to content

Conversation

@niroula-kushal
Copy link
Contributor

Added tests for all months in those years.

@niroula-kushal
Copy link
Contributor Author

Somehow fixed the data and made it work.

No idea if there is a better way, or if the core algorithm requires changes.

daysNumFromMinBsYear += bsDate + 1;
} else if (bsYear === 2081 && bsMonth === 12) {
daysNumFromMinBsYear += bsDate - 1;
} else if (bsYear === 2082 && bsMonth === 2) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is forcefull way of doing it, instead i think we can update the core data.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly. I guess the core maintainers have to take a crack at it. This fix is just a brute force method intended to get the job done for a couple of months. We are bound to face this issue again next year or a year after.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this isn't correct. Nepali calendar data is readily available using that would simply this.

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.

3 participants