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

It seems that the method numberOfMonthsUntilEndDate can be wrong #13

Open
xilin opened this issue Jul 23, 2015 · 2 comments
Open

It seems that the method numberOfMonthsUntilEndDate can be wrong #13

xilin opened this issue Jul 23, 2015 · 2 comments

Comments

@xilin
Copy link

xilin commented Jul 23, 2015

The method numberOfMonthsUntilEndDate written in
https://github.com/distefam/MDCalendar/blob/master/MDCalendar/NSDate%2BMDCalendar.m#L164
can be wrong when the day of start date is larger than the day of end date.

For example, if the start date is '2015-07-20' and the end date is '2015-08-10', the method will return 0, which will result in only showing July in calendar.

@laposheureux
Copy link

I know this is ancient, but the function itself sounds like it's functioning fine. There are 0 full months between that start and end date (or even a minimum number of days to comprise a month). The implementation that depends on it might be wrong though.

@xilin
Copy link
Author

xilin commented Nov 10, 2016

@laposheureux It did makes sense.

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

2 participants