You can use recursion in real life(rocketships.ca)4 points·by Kluny·vor 12 Jahren·4 commentsrocketships.caYou can use recursion in real lifehttp://rocketships.ca/blog/674/2 commentsPost comment[–]66d8kk·vor 12 JahrenreplyJust 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·vor 12 JahrenreplyQuite possibly, I'll check it out. We're already using the CakePHP framework, do you think Carbon would be compatible with it?[–]th0br0·vor 12 JahrenreplyWhy don't you cache $weekends though? Given that you're constantly recalculating it, it probably has a serious performance impact?[–]Kluny·vor 12 JahrenreplyI 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