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

startDate value is different if "moment-timezone" is present #82

Open
trevordunn opened this issue Oct 8, 2017 · 2 comments
Open

startDate value is different if "moment-timezone" is present #82

trevordunn opened this issue Oct 8, 2017 · 2 comments

Comments

@trevordunn
Copy link

Not sure I understand why including the "moment-timezone" package changes the startDate value.

// Without "moment-timezone"
let foo = moment().recur();
console.log(foo.startDate().toDate()); // Fri Oct 06 2017 18:00:00 GMT-0600 (MDT)
import "moment-timezone";
let foo = moment().recur();
console.log(foo.startDate().toDate()); // Sat Oct 07 2017 00:00:00 GMT-0600 (MDT)

(today is Oct 7)

Intentional? Seems to be related to the moment.fn.dateOnly plugin that moment-recur defines.

@MartijnWelker
Copy link

@c-trimm Experiencing the same issue, date matching is failing for me because of this. Any advice ?

@niftylettuce
Copy link
Contributor

You should be able to use simple-recur as an alternative to this project (there are several core bugs described in #85). See https://github.com/jamiter/simple-recur.
I'm waiting on a PR to merge for better documentation for that repo at Swydo/simple-recur#3 -- so until that is resolved you can view better docs at https://github.com/niftylettuce/simple-recur/tree/patch-1#simple-recur in the meanwhile.

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

3 participants