All pastes #481198 Raw Edit

Miscellany

public php v1 · immutable
·published 2007-05-10 18:12 UTC
rendered paste body
<?phprequire_once ('phpagi.php');$agi = new agi();$today = getdate();$month = date("n",$today);$day = date("j",$today);$year = date("Y",$today);$jewishDate = jdtojewish(gregoriantojd($month, $day, $year));$chag["1/1"] = "Rosh Hashana 1";$chag["1/2"] = "Rosh Hashana 2";$chag["1/15"] = "Succos";$chag["1/16"] = "Succos";$chag["1/17"] = "Succos";$chag["1/18"] = "Succos";$chag["1/19"] = "Succos";$chag["1/20"] = "Succos";$chag["1/21"] = "Succos";$chag["9/21"] = "Lag Be'omer";$jewishDate = substr($jewishDate,0,strrpos($jewishDate,"/") - 1);if ($chag[$jewishDate]) {      $agi->set_variable("chag", "chag");} else {      $agi->set_variable("chag", "nochag");}?>