Skip to content

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

@DheerajKN

Description

@DheerajKN

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions