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

isBetween not working correcly with hermes engine #5208

Closed
tankpower1 opened this issue Aug 24, 2019 · 3 comments
Closed

isBetween not working correcly with hermes engine #5208

tankpower1 opened this issue Aug 24, 2019 · 3 comments

Comments

@tankpower1
Copy link

tankpower1 commented Aug 24, 2019

Describe the bug
Using isBetween with hermes engine in react native returns false with default moment configurations.

To Reproduce
Steps to reproduce the behavior:

  1. ['2019-06-06', '2019-06-07].filter(d => moment(d).isBetween('2019-06-05', '2019-06-08', null, '[]'));

Expected behavior
Expected: returns both dates from the array
Result: returns an empty array

Moment-specific environment

react-native
android
hermes engine

Additional context
When i turn off hermes the method works fine so i cant really decide if the problem is with moments default locale or timezone or hermes itself.

@keshk26
Copy link

keshk26 commented Oct 7, 2019

@tankpower1 did you find a solution for this? I am having this issue for moment.diff() as well. moment(date).diff(Date.now()) > 0 always returns false on Android(w/hermes) but works fine on iOS.

@tankpower1
Copy link
Author

I haven't found a solution, just disabled hermes for now until its fixed.

@marwahaha
Copy link
Member

Based on facebook/hermes#136 and facebook/hermes#175, I think it is related to Hermes's date processing (or perhaps processing of / characters?)

I do not think this is a Moment.js problem. I'd recommend opening an issue with Hermes if someone still has a problem.

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

No branches or pull requests

3 participants