Skip to content

Instantly share code, notes, and snippets.

@jblac
Created February 12, 2013 16:42
Show Gist options
  • Save jblac/4771207 to your computer and use it in GitHub Desktop.
Save jblac/4771207 to your computer and use it in GitHub Desktop.
public function _getLastBusinessDay() {
// lets figure out the business days..
$holidayList = array();
$ourDate = date('Y-m-d', strtotime('-5 weekdays'));
if (in_array($ourDate, $holidayList)) {
$ourDate = date('Y-m-d', strtotime('-1 weekday', strtotime($ourDate)));
}
return $ourDate;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment