note 47839 added to function.date-sunrise

From: Date: Thu, 02 Dec 2004 09:41:29 +0000
Subject: note 47839 added to function.date-sunrise
Groups: php.notes 
Request: Send a blank email to php-notes+get-81266@lists.php.net to get a copy of this message
The way to use this: <?php // De Bilt, The Netherlands, weather station #06260 $lat = 52.10; // North $long = 5.18; // East $offset = 1; // difference between GMT and local time in hours $zenith=90+50/60; echo "<br><p>Sunrise: ".date_sunrise(time(), SUNFUNCS_RET_STRING, $lat, $long, $zenith, $offset); echo "<br>Sunset: ".date_sunset(time(), SUNFUNCS_RET_STRING, $lat, $long, $zenith, $offset); $zenith=96; echo "<br><p>Civilian Twilight start: ".date_sunrise(time(), SUNFUNCS_RET_STRING, $lat, $long, $zenith, $offset); echo "<br>Civilian Twilight end: ".date_sunset(time(), SUNFUNCS_RET_STRING, $lat, $long, $zenith, $offset); $zenith=102; echo "<br><p>Nautical Twilight start: ".date_sunrise(time(), SUNFUNCS_RET_STRING, $lat, $long, $zenith, $offset); echo "<br>Nautical Twilight end: ".date_sunset(time(), SUNFUNCS_RET_STRING, $lat, $long, $zenith, $offset); $zenith=108; echo "<br><p>Astronomical Twilight start: ".date_sunrise(time(), SUNFUNCS_RET_STRING, $lat, $long, $zenith, $offset); echo "<br>Astronomical Twilight end: ".date_sunset(time(), SUNFUNCS_RET_STRING, $lat, $long, $zenith, $offset); ?> Zenith according to the U.S. Navy's 1990 Almanac for Computers. Thanks to George King. More sources about this topic: http://www.qarlos.free.fr/navegacion/Sextante/formulas.htm http://williams.best.vwh.net/sunrise_sunset_algorithm.htm http://www.kevinboone.com/suntimes.html http://star-www.st-and.ac.uk/~fv/webnotes/chapt12.htm ---- Manual Page -- http://www.php.net/manual/en/function.date-sunrise.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+47839 Delete -- http://master.php.net/manage/user-notes.php?action=delete+47839&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47839&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47839&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47839&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47839&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47839&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+47839&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#81266) next »