SwiftMoment icon indicating copy to clipboard operation
SwiftMoment copied to clipboard

bugs in endof

Open qgliu opened this issue 8 years ago • 0 comments

A bug in endof month (especially February 2017)?

print("endof m", moment().endOf(TimeUnit.Months).date.toDateTime())
print("start of next -1", moment().add(1, TimeUnit.Months).startOf(TimeUnit.Months).subtract(1, "d").date.toDateTime())

The results are 3/2/17, 11:59 PM and 2/28/17, 12:00 AM

I am with Version 0.6

qgliu avatar Feb 15 '17 05:02 qgliu