/hphp/test/zend/bad/ext/date/tests/mktime-3.php
http://github.com/facebook/hiphop-php · PHP · 20 lines · 19 code · 1 blank · 0 comment · 3 complexity · c6028db29fe7ce8ffa0e75f5cdb78412 MD5 · raw file
- <?php
- $tzs = array("America/Toronto", "Europe/Oslo");
- $years = array(0, 69, 70, 71, 99, 100, 105, 1900, 1901, 1902, 1999, 2000, 2001);
- foreach ($tzs as $tz) {
- echo $tz, "\n";
- date_default_timezone_set($tz);
- foreach ($years as $year) {
- printf("Y: %4d - ", $year);
- $ret = mktime(1, 1, 1, 1, 1, $year);
- if ($ret == FALSE) {
- echo "out of range\n";
- } else {
- echo date("F ".DATE_ISO8601, $ret), "\n";
- }
- }
- echo "\n";
- }
- ?>
- ===Done===