Created
November 3, 2012 07:32
-
-
Save msng/4006419 to your computer and use it in GitHub Desktop.
「PHP祭り2日目の会場地点での、日の出の時刻は何時何分何秒でしょう?」への解答を示す PHP スクリプト
This file contains hidden or 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 | |
$timestamp = strtotime('2012-11-04'); | |
$format = SUNFUNCS_RET_TIMESTAMP; | |
$latitude = 33.590383; | |
$longitude = 130.423992; | |
$sunriseTimestamp = date_sunrise($timestamp , $format, $latitude, $longitude); | |
$sunriseDateTime = date('H:i:s', $sunriseTimestamp); | |
echo $sunriseDateTime; //06:40:03 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment