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

.overlaps & .contains always returning false #285

Open
bdcarr opened this issue Aug 27, 2020 · 0 comments
Open

.overlaps & .contains always returning false #285

bdcarr opened this issue Aug 27, 2020 · 0 comments

Comments

@bdcarr
Copy link

bdcarr commented Aug 27, 2020

I feel like I must be doing something wrong here (copy/paste from node REPL):

> const tsRange = moment.range(moment.unix(1563224400), moment.unix(1563234000))
undefined
> const discardRange = moment('2020-07-16').range('day')
undefined
> discardRange.toString()
'2020-07-16T00:00:00+10:00/2020-07-16T23:59:59+10:00'
> tsRange.toString()
'2019-07-16T07:00:00+10:00/2019-07-16T09:40:00+10:00'
> tsRange.contains(discardRange)
false
> discardRange.contains(tsRange)
false
> tsRange.overlaps(discardRange)
false
> discardRange.overlaps(tsRange)
false

Running v4.0.2

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