Back to index

php5  5.3.10
DateTime_data-massive.inc
Go to the documentation of this file.
00001 <?php
00002 
00003 /*
00004  * Note: test names match method names in a set of PHPUnit tests
00005  * in a userland package.  Please be so kind as to leave them.
00006  */
00007 
00008 date_default_timezone_set('America/New_York');
00009 
00010 
00011 /*
00012  * Massive dates
00013  */
00014 echo "test_massive_positive: ";
00015 $end = new DateTime;
00016 $end->setDate(333333, 1, 1);
00017 $end->setTime(16, 18, 02);
00018 
00019 $start = new DateTime;
00020 $start->setDate(-333333, 1, 1);
00021 $start->setTime(16, 18, 02);
00022 
00023 examine_diff($end, $start, 'P+666666Y0M0DT0H0M0S', 243494757);
00024 
00025 echo "test_massive_negative: ";
00026 $end = new DateTime;
00027 $end->setDate(-333333, 1, 1);
00028 $end->setTime(16, 18, 02);
00029 
00030 $start = new DateTime;
00031 $start->setDate(333333, 1, 1);
00032 $start->setTime(16, 18, 02);
00033 
00034 examine_diff($end, $start, 'P-666666Y0M0DT0H0M0S', 243494757);