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

Twix trims of time when using .iterate() function #109

Open
DheerajKN opened this issue Feb 19, 2019 · 0 comments
Open

Twix trims of time when using .iterate() function #109

DheerajKN opened this issue Feb 19, 2019 · 0 comments

Comments

@DheerajKN
Copy link

I am facing a problem with twix's iterate method as the result is trimming of the time from the results.
Implementation:
var itr = moment.twix(new Date('2012-01-15T16:30:00'),new Date('2012-03-20T16:30:00')).iterate("months");

Current Result:

2012-01-15T00:00:00
2012-01-16T00:00:00
2012-01-17T00:00:00
2012-01-18T00:00:00
2012-01-19T00:00:00
2012-01-20T00:00:00

But Expected:

2012-01-15T16:30:00
2012-01-16T16:30:00
2012-01-17T16:30:00
2012-01-18T16:30:00
2012-01-19T16:30:00
2012-01-20T16:30:00

So what has to be done to iterate method so that above result can be fetched

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