Created
September 4, 2013 17:14
-
-
Save wizardishungry/6439938 to your computer and use it in GitHub Desktop.
sunrise sunset calculations for the north pole are surprising
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
date_default_timezone_set('GMT'); | |
$tim = strtotime("December 21"); | |
$fmt = SUNFUNCS_RET_STRING; | |
$lat = 90; | |
$lng = 0; | |
for($i = 0; $i<182; $i++) { | |
echo date(DATE_RFC822, $tim), "\t", | |
date_sunrise($tim, $fmt, $lat, $lng), " ", | |
date_sunset($tim, $fmt, $lat, $lng), "\n"; | |
$tim = strtotime("+1 day", $tim); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment