Skip to content

Instantly share code, notes, and snippets.

@davialexandre
Created September 28, 2016 10:55
Show Gist options
  • Save davialexandre/9452c04cc182ea79b17eb9838a22d552 to your computer and use it in GitHub Desktop.
Save davialexandre/9452c04cc182ea79b17eb9838a22d552 to your computer and use it in GitHub Desktop.
<?php
public function getNumberOfPublicHolidaysForPeriod() {
if(!$this->numberOfPublicHolidaysInPeriod) {
$this->numberOfPublicHolidaysInPeriod = PublicHoliday::getNumberOfPublicHolidaysForPeriod(
$this->period->start_date,
$this->period->end_date
);
}
return $this->numberOfPublicHolidaysInPeriod;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment