All pastes #293061 Raw Edit

Someone

public text v1 · immutable
#293061 ·published 2006-12-27 04:20 UTC
rendered paste body
$nowy=date("Y-m-25");
print "Checking for $nowy\n";
  $holiday        = $usa->getHolidayForDate($nowy, 'en_EN', false);




if (! Date_Holidays::isError($holiday) && ! is_null($holiday)) {
    print_r($holiday->toArray());
print $usa->$holiday['title'];
print $holiday['title'];      
print $holiday->title;


}








OUTPUT





Checking for 2006-12-25
Array
(
    [internalName] => christmasDay
    [title] => Christmas Day
    [date] => date Object
        (
            [year] => 2006
            [month] => 12
            [day] => 25
            [hour] => 0
            [minute] => 0
            [second] => 0
            [partsecond] => 0
            [tz] => date_timezone Object
                (
                    [id] => EST
                    [longname] => Eastern Standard Time
                    [shortname] => EST
                    [hasdst] => 1
                    [dstlongname] => Eastern Daylight Time
                    [dstshortname] => EDT
                    [offset] => -18000000
                    [default] => 
                )

            [getWeekdayAbbrnameLength] => 3
        )

)
PHP Notice:  Undefined property:   in /maintenance/holi.php on line 36
PHP Notice:  Undefined property:  title in /maintenance/holi.php on line 38