Skip to content
This repository has been archived by the owner on Feb 3, 2020. It is now read-only.

Bug in endOf in any months with 31 days #98

Open
etruta opened this issue Dec 4, 2017 · 1 comment
Open

Bug in endOf in any months with 31 days #98

etruta opened this issue Dec 4, 2017 · 1 comment

Comments

@etruta
Copy link

etruta commented Dec 4, 2017

Detailed Description

When I use the moment().endOf("M") in many 31 days months, as December, the return is the day 30th.

moment().endOf("M").format("dd/MM/YYYY") return 30/12/2017

Context

I use this to show the start and end of a month report

Environment

  • Version used: 0.7
@etruta
Copy link
Author

etruta commented Dec 4, 2017

Add a month in months with 31 days too have problem when use the moment().startOf("M").

(moment().startOf("M") + 1.months).format("dd/MM/YYYY") return 31/12/2017 when the correct is 01/01/2018.

Maybe, this problem cause de endOf problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant