Skip to content

Instantly share code, notes, and snippets.

@jblac
Created February 12, 2013 18:41
Show Gist options
  • Save jblac/4772153 to your computer and use it in GitHub Desktop.
Save jblac/4772153 to your computer and use it in GitHub Desktop.
public function _getHolidayList() {
$newArray = array();
$dt = new \DateTime();
$newArray[] = $dt->modify("First day of January")->format('Y-m-d');
$newArray[] = $dt->modify("Third Monday of January")->format('Y-m-d');
$newArray[] = $dt->modify("Third Monday of February")->format('Y-m-d');
$newArray[] = $dt->modify("Last Monday of May")->format("Y-m-d");
$newArray[] = $dt->modify("July 4")->format("Y-m-d");
$newArray[] = $dt->modify("First Monday of September")->format("Y-m-d");
$newArray[] = $dt->modify("Second Monday of October")->format("Y-m-d");
$newArray[] = $dt->modify("November 11")->format("Y-m-d");
$newArray[] = $dt->modify("Fourth Thursday of November")->format("Y-m-d");
$newArray[] = $dt->modify("December 25")->format("Y-m-d");
return $newArray;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment