

You can use recursion in real life - Kluny
http://rocketships.ca/blog/674/

======
66d8kk
Just 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](https://github.com/briannesbitt/Carbon)

~~~
Kluny
Quite possibly, I'll check it out. We're already using the CakePHP framework,
do you think Carbon would be compatible with it?

------
th0br0
Why don't you cache $weekends though? Given that you're constantly
recalculating it, it probably has a serious performance impact?

~~~
Kluny
I think the framework caches it automatically, but good point, I should check
that.

