Annotation of embedaddon/php/ext/date/tests/date_sunrise_and_sunset_basic.phpt, revision 1.1.1.2

1.1       misho       1: --TEST--
                      2: Basic test for date_sunrise and date_sunset based on example in PHP manual
                      3: --FILE--
                      4: <?php
                      5: 
                      6: date_default_timezone_set('UTC');
                      7: 
                      8: /* calculate the sunrise time for Lisbon, Portugal
                      9: Latitude: 38.4 North
                     10: Longitude: 9 West
                     11: Zenith ~= 90
                     12: offset: +1 GMT
                     13: */
                     14: 
                     15: echo "Basic test for date_sunrise() and date_sunset()\n";
                     16: 
1.1.1.2 ! misho      17: // suppress date() function strict msgs 
1.1       misho      18: error_reporting(E_ALL & ~E_STRICT);
                     19: 
                     20: echo date("D M d Y") . ', sunrise time : ' . date_sunrise(time(), SUNFUNCS_RET_STRING, 38.4, -9, 90, 1) . "\n";
                     21: echo date("D M d Y") . ', sunset time : ' . date_sunset(time(), SUNFUNCS_RET_STRING, 38.4, -9, 90, 1) . "\n";
                     22: 
                     23: ?>
                     24: ===Done===
                     25: --EXPECTF--
                     26: Basic test for date_sunrise() and date_sunset()
                     27: %s %s %d %d, sunrise time : %d:%d
                     28: %s %s %d %d, sunset time : %d:%d
                     29: ===Done===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>