3 ms·
You can use recursion in real life
- 66d8kk 13y agoJust 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 13y agoQuite possibly, I'll check it out. We're already using the CakePHP framework, do you think Carbon would be compatible with it?
- th0br0 13y agoWhy don't you cache $weekends though? Given that you're constantly recalculating it, it probably has a serious performance impact?
- Kluny 13y agoI think the framework caches it automatically, but good point, I should check that.