O'Reilly logo

Programming PHP, 3rd Edition by Peter MacIntyre, Kevin Tatroe, Rasmus Lerdorf

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

date_sun_info

Synopsis

array date_sun_info(int timestamp, float latitude, float longitude)

Returns information as an associative array about the times of sunrise and sunset, and the times twilight begins and ends, at a given latitude and longitude. The resulting array contains the following keys:

sunrise

The time sunrise occurs

sunset

The time sunset occurs

transit

The time the sun is at its zenith

civil_twilight_begin

The time civil twilight begins

civil_twilight_end

The time civil twilight ends

nautical_twilight_begin

The time nautical twilight begins

nautical_twilight_end

The time nautical twilight ends

astronomical_twilight_begin

The time astronomical twilight begins

astronomical_twilight_end

The time astronomical twilight ends

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required