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

After updating to 2.2.0, I can't call the methods in the NSDate category anymore. Can you add them back? #365

Closed
Sweeper777 opened this issue Jul 11, 2016 · 7 comments

Comments

@Sweeper777
Copy link

I just updated my pods. After that, I see that you removed methods like fs_dateByAddingDays and fs_dateByIgnoringTimeComponents. Can you add them back? Or did you put it somewhere else?

@WenchaoD
Copy link
Owner

WenchaoD commented Jul 11, 2016

[calendar dateByAddingDays:days toDate:date];
[calendar dateByIgnoringTimeComponentsOfDate:date];

@Sweeper777
Copy link
Author

Okay, but why must it be called on an instance of FSCalendar? Wouldn't it be better if the methods are static? Something like this:

[FSCalendar dateByAddingDays:days toDate:date];

@WenchaoD
Copy link
Owner

Because if there are more than one instance of FSCalendar with different identifiers (maybe very few people would use like that), there could be problems. Try to think it also like a NSCalendar instance.

@Sweeper777
Copy link
Author

I see. One more question, will I run into performance/memory problems if I have a few lines of code creating FSCalendars just to call the methods? Like this: (Swift)

FSCalendar().dateByAddingDays(1, toDate: someDate)

That shouldn't be a problem, right? Since I have ARC on.

@WenchaoD
Copy link
Owner

Never mind. I'll push a fix for this.

@Sweeper777
Copy link
Author

Sweeper777 commented Jul 11, 2016

Thanks! Please tell me when you're done.

@WenchaoD
Copy link
Owner

Hi @Sweeper777 U can find the older version here for a temporary solusion.

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