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

The isSameOrAfter() method does not return the expected result when comparing a Jalali date with a valid date. #135

Open
valakhosravi opened this issue May 29, 2023 · 0 comments

Comments

@valakhosravi
Copy link

Bug Description:

The isSameOrAfter() method in jalali-moment library does not return the expected result when comparing a Jalali date with a valid date.

To Reproduce:

const result = moment('1402-02-30', 'jYYYY-jM-jD').isSameOrAfter('1402-02-30');
console.log(result); // Returns false, but expected true

Expected Result:

The isSameOrAfter() method should return true when comparing the same Jalali date.

Actual Result:

The isSameOrAfter() method returns false instead of true when comparing the same Jalali date.

Additional Information:

  • jalali-moment version: "^3.3.11"

Workaround:

A possible workaround is to validate the input dates before performing the comparison to ensure they are valid Jalali dates.

@valakhosravi valakhosravi changed the title The isSameOrAfter() method in jalali-moment library does not return the expected result when comparing a Jalali date with a valid date. The isSameOrAfter() method does not return the expected result when comparing a Jalali date with a valid date. May 29, 2023
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

No branches or pull requests

1 participant