You can use recursion in real life(rocketships.ca)4 points·by Kluny·12년 전·4 commentsrocketships.caYou can use recursion in real lifehttp://rocketships.ca/blog/674/2 commentsPost comment[–]66d8kk·12년 전replyJust a thought and I've only glanced at your code but could some of the functionality in the Carbon library come in handy? especially for the logic in weekendDates()?I like to think of it as DateTime on acid ;)https://github.com/briannesbitt/Carbon[–]Kluny·12년 전replyQuite possibly, I'll check it out. We're already using the CakePHP framework, do you think Carbon would be compatible with it?[–]th0br0·12년 전replyWhy don't you cache $weekends though? Given that you're constantly recalculating it, it probably has a serious performance impact?[–]Kluny·12년 전replyI think the framework caches it automatically, but good point, I should check that.
I like to think of it as DateTime on acid ;)
https://github.com/briannesbitt/Carbon