danielc Tue, 23 Aug 2011 16:40:19 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=315376
Log: Fix differences in some sub() results that were causing tests to fail. Changed paths: U php/php-src/branches/PHP_5_3/ext/date/tests/DateTime_data-dates.inc U php/php-src/branches/PHP_5_3/ext/date/tests/DateTime_data-february.inc U php/php-src/branches/PHP_5_3/ext/date/tests/DateTime_sub-dates.phpt U php/php-src/branches/PHP_5_3/ext/date/tests/DateTime_sub-february.phpt U php/php-src/branches/PHP_5_4/ext/date/tests/DateTime_data-dates.inc U php/php-src/branches/PHP_5_4/ext/date/tests/DateTime_data-february.inc U php/php-src/branches/PHP_5_4/ext/date/tests/DateTime_sub-dates.phpt U php/php-src/branches/PHP_5_4/ext/date/tests/DateTime_sub-february.phpt U php/php-src/trunk/ext/date/tests/DateTime_data-dates.inc U php/php-src/trunk/ext/date/tests/DateTime_data-february.inc U php/php-src/trunk/ext/date/tests/DateTime_sub-dates.phpt U php/php-src/trunk/ext/date/tests/DateTime_sub-february.phpt
Modified: php/php-src/branches/PHP_5_3/ext/date/tests/DateTime_data-dates.inc =================================================================== --- php/php-src/branches/PHP_5_3/ext/date/tests/DateTime_data-dates.inc 2011-08-23 15:43:40 UTC (rev 315375) +++ php/php-src/branches/PHP_5_3/ext/date/tests/DateTime_data-dates.inc 2011-08-23 16:40:19 UTC (rev 315376) @@ -20,6 +20,7 @@ echo "test_years_positive__7_by_1_day: "; examine_diff('2007-02-08', '2000-02-07', 'P+7Y0M1DT0H0M0S', 2558); +// NOTE: sub() produces different answer. echo "test_years_positive__6_shy_1_day: "; examine_diff('2007-02-06', '2000-02-07', 'P+6Y11M30DT0H0M0S', 2556); @@ -48,6 +49,7 @@ echo "test_years_negative__7_by_1_day: "; examine_diff('2000-02-07', '2007-02-08', 'P-7Y0M1DT0H0M0S', 2558); +// NOTE: sub() produces different answer. echo "test_years_negative__6_shy_1_day: "; examine_diff('2000-02-07', '2007-02-06', 'P-6Y11M28DT0H0M0S', 2556); Modified: php/php-src/branches/PHP_5_3/ext/date/tests/DateTime_data-february.inc =================================================================== --- php/php-src/branches/PHP_5_3/ext/date/tests/DateTime_data-february.inc 2011-08-23 15:43:40 UTC (rev 315375) +++ php/php-src/branches/PHP_5_3/ext/date/tests/DateTime_data-february.inc 2011-08-23 16:40:19 UTC (rev 315376) @@ -71,15 +71,19 @@ echo "test_bug_49081__20: "; examine_diff('2010-03-01', '2010-01-31', 'P+0Y0M29DT0H0M0S', 29); +// NOTE: sub() produces different answer. echo "test_bug_49081__21: "; examine_diff('2010-03-27', '2010-01-31', 'P+0Y1M24DT0H0M0S', 55); +// NOTE: sub() produces different answer. echo "test_bug_49081__22: "; examine_diff('2010-03-28', '2010-01-31', 'P+0Y1M25DT0H0M0S', 56); +// NOTE: sub() produces different answer. echo "test_bug_49081__23: "; examine_diff('2010-03-29', '2010-01-31', 'P+0Y1M26DT0H0M0S', 57); +// NOTE: sub() produces different answer. echo "test_bug_49081__24: "; examine_diff('2010-03-30', '2010-01-31', 'P+0Y1M27DT0H0M0S', 58); @@ -168,18 +172,23 @@ echo "test_bug_49081_negative__19: "; examine_diff('2010-01-01', '2010-03-01', 'P-0Y2M0DT0H0M0S', 59); +// NOTE: sub() produces different answer. echo "test_bug_49081_negative__20: "; examine_diff('2010-01-31', '2010-03-01', 'P-0Y1M1DT0H0M0S', 29); +// NOTE: sub() produces different answer. echo "test_bug_49081_negative__21: "; examine_diff('2010-01-31', '2010-03-27', 'P-0Y1M27DT0H0M0S', 55); +// NOTE: sub() produces different answer. echo "test_bug_49081_negative__22: "; examine_diff('2010-01-31', '2010-03-28', 'P-0Y1M28DT0H0M0S', 56); +// NOTE: sub() produces different answer. echo "test_bug_49081_negative__23: "; examine_diff('2010-01-31', '2010-03-29', 'P-0Y1M29DT0H0M0S', 57); +// NOTE: sub() produces different answer. echo "test_bug_49081_negative__24: "; examine_diff('2010-01-31', '2010-03-30', 'P-0Y1M30DT0H0M0S', 58); Modified: php/php-src/branches/PHP_5_3/ext/date/tests/DateTime_sub-dates.phpt =================================================================== --- php/php-src/branches/PHP_5_3/ext/date/tests/DateTime_sub-dates.phpt 2011-08-23 15:43:40 UTC (rev 315375) +++ php/php-src/branches/PHP_5_3/ext/date/tests/DateTime_sub-dates.phpt 2011-08-23 16:40:19 UTC (rev 315376) @@ -14,7 +14,7 @@ test__7: SUB: 2009-01-14 00:00:00 EST - P+0Y0M7DT0H0M0S = **2009-01-07 00:00:00 EST** test_years_positive__7_by_0_day: SUB: 2007-02-07 00:00:00 EST - P+7Y0M0DT0H0M0S = **2000-02-07 00:00:00 EST** test_years_positive__7_by_1_day: SUB: 2007-02-08 00:00:00 EST - P+7Y0M1DT0H0M0S = **2000-02-07 00:00:00 EST** -test_years_positive__6_shy_1_day: SUB: 2007-02-06 00:00:00 EST - P+6Y11M30DT0H0M0S = **2000-02-07 00:00:00 EST** +test_years_positive__6_shy_1_day: SUB: 2007-02-06 00:00:00 EST - P+6Y11M30DT0H0M0S = **2000-02-05 00:00:00 EST** test_years_positive__7_by_1_month: SUB: 2007-03-07 00:00:00 EST - P+7Y1M0DT0H0M0S = **2000-02-07 00:00:00 EST** test_years_positive__6_shy_1_month: SUB: 2007-01-07 00:00:00 EST - P+6Y11M0DT0H0M0S = **2000-02-07 00:00:00 EST** test_years_positive__7_by_1_month_split_newyear: SUB: 2007-01-07 00:00:00 EST - P+7Y1M0DT0H0M0S = **1999-12-07 00:00:00 EST** @@ -22,7 +22,7 @@ test_negative__7: SUB: 2009-01-07 00:00:00 EST - P-0Y0M7DT0H0M0S = **2009-01-14 00:00:00 EST** test_years_negative__7_by_0_day: SUB: 2000-02-07 00:00:00 EST - P-7Y0M0DT0H0M0S = **2007-02-07 00:00:00 EST** test_years_negative__7_by_1_day: SUB: 2000-02-07 00:00:00 EST - P-7Y0M1DT0H0M0S = **2007-02-08 00:00:00 EST** -test_years_negative__6_shy_1_day: SUB: 2000-02-07 00:00:00 EST - P-6Y11M28DT0H0M0S = **2007-02-06 00:00:00 EST** +test_years_negative__6_shy_1_day: SUB: 2000-02-07 00:00:00 EST - P-6Y11M28DT0H0M0S = **2007-02-04 00:00:00 EST** test_years_negative__7_by_1_month: SUB: 2000-02-07 00:00:00 EST - P-7Y1M0DT0H0M0S = **2007-03-07 00:00:00 EST** test_years_negative__6_shy_1_month: SUB: 2000-02-07 00:00:00 EST - P-6Y11M0DT0H0M0S = **2007-01-07 00:00:00 EST** test_years_negative__7_by_1_month_split_newyear: SUB: 1999-12-07 00:00:00 EST - P-7Y1M0DT0H0M0S = **2007-01-07 00:00:00 EST** Modified: php/php-src/branches/PHP_5_3/ext/date/tests/DateTime_sub-february.phpt =================================================================== --- php/php-src/branches/PHP_5_3/ext/date/tests/DateTime_sub-february.phpt 2011-08-23 15:43:40 UTC (rev 315375) +++ php/php-src/branches/PHP_5_3/ext/date/tests/DateTime_sub-february.phpt 2011-08-23 16:40:19 UTC (rev 315376) @@ -31,10 +31,10 @@ test_bug_49081__18: SUB: 2010-02-28 00:00:00 EST - P+0Y1M1DT0H0M0S = **2010-01-27 00:00:00 EST** test_bug_49081__19: SUB: 2010-03-01 00:00:00 EST - P+0Y2M0DT0H0M0S = **2010-01-01 00:00:00 EST** test_bug_49081__20: SUB: 2010-03-01 00:00:00 EST - P+0Y0M29DT0H0M0S = **2010-01-31 00:00:00 EST** -test_bug_49081__21: SUB: 2010-03-27 00:00:00 EDT - P+0Y1M24DT0H0M0S = **2010-01-31 00:00:00 EST** -test_bug_49081__22: SUB: 2010-03-28 00:00:00 EDT - P+0Y1M25DT0H0M0S = **2010-01-31 00:00:00 EST** -test_bug_49081__23: SUB: 2010-03-29 00:00:00 EDT - P+0Y1M26DT0H0M0S = **2010-01-31 00:00:00 EST** -test_bug_49081__24: SUB: 2010-03-30 00:00:00 EDT - P+0Y1M27DT0H0M0S = **2010-01-31 00:00:00 EST** +test_bug_49081__21: SUB: 2010-03-27 00:00:00 EDT - P+0Y1M24DT0H0M0S = **2010-02-03 00:00:00 EST** +test_bug_49081__22: SUB: 2010-03-28 00:00:00 EDT - P+0Y1M25DT0H0M0S = **2010-02-03 00:00:00 EST** +test_bug_49081__23: SUB: 2010-03-29 00:00:00 EDT - P+0Y1M26DT0H0M0S = **2010-02-03 00:00:00 EST** +test_bug_49081__24: SUB: 2010-03-30 00:00:00 EDT - P+0Y1M27DT0H0M0S = **2010-02-03 00:00:00 EST** test_bug_49081__25: SUB: 2010-03-31 00:00:00 EDT - P+0Y2M0DT0H0M0S = **2010-01-31 00:00:00 EST** test_bug_49081__26: SUB: 2010-03-31 00:00:00 EDT - P+0Y2M1DT0H0M0S = **2010-01-30 00:00:00 EST** test_bug_49081__27: SUB: 2009-01-31 00:00:00 EST - P+0Y0M30DT0H0M0S = **2009-01-01 00:00:00 EST** @@ -62,11 +62,11 @@ test_bug_49081_negative__17: SUB: 2010-01-28 00:00:00 EST - P-0Y1M0DT0H0M0S = **2010-02-28 00:00:00 EST** test_bug_49081_negative__18: SUB: 2010-01-27 00:00:00 EST - P-0Y1M1DT0H0M0S = **2010-02-28 00:00:00 EST** test_bug_49081_negative__19: SUB: 2010-01-01 00:00:00 EST - P-0Y2M0DT0H0M0S = **2010-03-01 00:00:00 EST** -test_bug_49081_negative__20: SUB: 2010-01-31 00:00:00 EST - P-0Y1M1DT0H0M0S = **2010-03-01 00:00:00 EST** -test_bug_49081_negative__21: SUB: 2010-01-31 00:00:00 EST - P-0Y1M27DT0H0M0S = **2010-03-27 00:00:00 EDT** -test_bug_49081_negative__22: SUB: 2010-01-31 00:00:00 EST - P-0Y1M28DT0H0M0S = **2010-03-28 00:00:00 EDT** -test_bug_49081_negative__23: SUB: 2010-01-31 00:00:00 EST - P-0Y1M29DT0H0M0S = **2010-03-29 00:00:00 EDT** -test_bug_49081_negative__24: SUB: 2010-01-31 00:00:00 EST - P-0Y1M30DT0H0M0S = **2010-03-30 00:00:00 EDT** +test_bug_49081_negative__20: SUB: 2010-01-31 00:00:00 EST - P-0Y1M1DT0H0M0S = **2010-03-04 00:00:00 EST** +test_bug_49081_negative__21: SUB: 2010-01-31 00:00:00 EST - P-0Y1M27DT0H0M0S = **2010-03-30 00:00:00 EDT** +test_bug_49081_negative__22: SUB: 2010-01-31 00:00:00 EST - P-0Y1M28DT0H0M0S = **2010-03-31 00:00:00 EDT** +test_bug_49081_negative__23: SUB: 2010-01-31 00:00:00 EST - P-0Y1M29DT0H0M0S = **2010-04-01 00:00:00 EDT** +test_bug_49081_negative__24: SUB: 2010-01-31 00:00:00 EST - P-0Y1M30DT0H0M0S = **2010-04-02 00:00:00 EDT** test_bug_49081_negative__25: SUB: 2010-01-31 00:00:00 EST - P-0Y2M0DT0H0M0S = **2010-03-31 00:00:00 EDT** test_bug_49081_negative__26: SUB: 2010-01-30 00:00:00 EST - P-0Y2M1DT0H0M0S = **2010-03-31 00:00:00 EDT** test_bug_49081_negative__27: SUB: 2009-01-01 00:00:00 EST - P-0Y0M30DT0H0M0S = **2009-01-31 00:00:00 EST** Modified: php/php-src/branches/PHP_5_4/ext/date/tests/DateTime_data-dates.inc =================================================================== --- php/php-src/branches/PHP_5_4/ext/date/tests/DateTime_data-dates.inc 2011-08-23 15:43:40 UTC (rev 315375) +++ php/php-src/branches/PHP_5_4/ext/date/tests/DateTime_data-dates.inc 2011-08-23 16:40:19 UTC (rev 315376) @@ -20,6 +20,7 @@ echo "test_years_positive__7_by_1_day: "; examine_diff('2007-02-08', '2000-02-07', 'P+7Y0M1DT0H0M0S', 2558); +// NOTE: sub() produces different answer. echo "test_years_positive__6_shy_1_day: "; examine_diff('2007-02-06', '2000-02-07', 'P+6Y11M30DT0H0M0S', 2556); @@ -48,6 +49,7 @@ echo "test_years_negative__7_by_1_day: "; examine_diff('2000-02-07', '2007-02-08', 'P-7Y0M1DT0H0M0S', 2558); +// NOTE: sub() produces different answer. echo "test_years_negative__6_shy_1_day: "; examine_diff('2000-02-07', '2007-02-06', 'P-6Y11M28DT0H0M0S', 2556); Modified: php/php-src/branches/PHP_5_4/ext/date/tests/DateTime_data-february.inc =================================================================== --- php/php-src/branches/PHP_5_4/ext/date/tests/DateTime_data-february.inc 2011-08-23 15:43:40 UTC (rev 315375) +++ php/php-src/branches/PHP_5_4/ext/date/tests/DateTime_data-february.inc 2011-08-23 16:40:19 UTC (rev 315376) @@ -71,15 +71,19 @@ echo "test_bug_49081__20: "; examine_diff('2010-03-01', '2010-01-31', 'P+0Y0M29DT0H0M0S', 29); +// NOTE: sub() produces different answer. echo "test_bug_49081__21: "; examine_diff('2010-03-27', '2010-01-31', 'P+0Y1M24DT0H0M0S', 55); +// NOTE: sub() produces different answer. echo "test_bug_49081__22: "; examine_diff('2010-03-28', '2010-01-31', 'P+0Y1M25DT0H0M0S', 56); +// NOTE: sub() produces different answer. echo "test_bug_49081__23: "; examine_diff('2010-03-29', '2010-01-31', 'P+0Y1M26DT0H0M0S', 57); +// NOTE: sub() produces different answer. echo "test_bug_49081__24: "; examine_diff('2010-03-30', '2010-01-31', 'P+0Y1M27DT0H0M0S', 58); @@ -168,18 +172,23 @@ echo "test_bug_49081_negative__19: "; examine_diff('2010-01-01', '2010-03-01', 'P-0Y2M0DT0H0M0S', 59); +// NOTE: sub() produces different answer. echo "test_bug_49081_negative__20: "; examine_diff('2010-01-31', '2010-03-01', 'P-0Y1M1DT0H0M0S', 29); +// NOTE: sub() produces different answer. echo "test_bug_49081_negative__21: "; examine_diff('2010-01-31', '2010-03-27', 'P-0Y1M27DT0H0M0S', 55); +// NOTE: sub() produces different answer. echo "test_bug_49081_negative__22: "; examine_diff('2010-01-31', '2010-03-28', 'P-0Y1M28DT0H0M0S', 56); +// NOTE: sub() produces different answer. echo "test_bug_49081_negative__23: "; examine_diff('2010-01-31', '2010-03-29', 'P-0Y1M29DT0H0M0S', 57); +// NOTE: sub() produces different answer. echo "test_bug_49081_negative__24: "; examine_diff('2010-01-31', '2010-03-30', 'P-0Y1M30DT0H0M0S', 58); Modified: php/php-src/branches/PHP_5_4/ext/date/tests/DateTime_sub-dates.phpt =================================================================== --- php/php-src/branches/PHP_5_4/ext/date/tests/DateTime_sub-dates.phpt 2011-08-23 15:43:40 UTC (rev 315375) +++ php/php-src/branches/PHP_5_4/ext/date/tests/DateTime_sub-dates.phpt 2011-08-23 16:40:19 UTC (rev 315376) @@ -14,7 +14,7 @@ test__7: SUB: 2009-01-14 00:00:00 EST - P+0Y0M7DT0H0M0S = **2009-01-07 00:00:00 EST** test_years_positive__7_by_0_day: SUB: 2007-02-07 00:00:00 EST - P+7Y0M0DT0H0M0S = **2000-02-07 00:00:00 EST** test_years_positive__7_by_1_day: SUB: 2007-02-08 00:00:00 EST - P+7Y0M1DT0H0M0S = **2000-02-07 00:00:00 EST** -test_years_positive__6_shy_1_day: SUB: 2007-02-06 00:00:00 EST - P+6Y11M30DT0H0M0S = **2000-02-07 00:00:00 EST** +test_years_positive__6_shy_1_day: SUB: 2007-02-06 00:00:00 EST - P+6Y11M30DT0H0M0S = **2000-02-05 00:00:00 EST** test_years_positive__7_by_1_month: SUB: 2007-03-07 00:00:00 EST - P+7Y1M0DT0H0M0S = **2000-02-07 00:00:00 EST** test_years_positive__6_shy_1_month: SUB: 2007-01-07 00:00:00 EST - P+6Y11M0DT0H0M0S = **2000-02-07 00:00:00 EST** test_years_positive__7_by_1_month_split_newyear: SUB: 2007-01-07 00:00:00 EST - P+7Y1M0DT0H0M0S = **1999-12-07 00:00:00 EST** @@ -22,7 +22,7 @@ test_negative__7: SUB: 2009-01-07 00:00:00 EST - P-0Y0M7DT0H0M0S = **2009-01-14 00:00:00 EST** test_years_negative__7_by_0_day: SUB: 2000-02-07 00:00:00 EST - P-7Y0M0DT0H0M0S = **2007-02-07 00:00:00 EST** test_years_negative__7_by_1_day: SUB: 2000-02-07 00:00:00 EST - P-7Y0M1DT0H0M0S = **2007-02-08 00:00:00 EST** -test_years_negative__6_shy_1_day: SUB: 2000-02-07 00:00:00 EST - P-6Y11M28DT0H0M0S = **2007-02-06 00:00:00 EST** +test_years_negative__6_shy_1_day: SUB: 2000-02-07 00:00:00 EST - P-6Y11M28DT0H0M0S = **2007-02-04 00:00:00 EST** test_years_negative__7_by_1_month: SUB: 2000-02-07 00:00:00 EST - P-7Y1M0DT0H0M0S = **2007-03-07 00:00:00 EST** test_years_negative__6_shy_1_month: SUB: 2000-02-07 00:00:00 EST - P-6Y11M0DT0H0M0S = **2007-01-07 00:00:00 EST** test_years_negative__7_by_1_month_split_newyear: SUB: 1999-12-07 00:00:00 EST - P-7Y1M0DT0H0M0S = **2007-01-07 00:00:00 EST** Modified: php/php-src/branches/PHP_5_4/ext/date/tests/DateTime_sub-february.phpt =================================================================== --- php/php-src/branches/PHP_5_4/ext/date/tests/DateTime_sub-february.phpt 2011-08-23 15:43:40 UTC (rev 315375) +++ php/php-src/branches/PHP_5_4/ext/date/tests/DateTime_sub-february.phpt 2011-08-23 16:40:19 UTC (rev 315376) @@ -31,10 +31,10 @@ test_bug_49081__18: SUB: 2010-02-28 00:00:00 EST - P+0Y1M1DT0H0M0S = **2010-01-27 00:00:00 EST** test_bug_49081__19: SUB: 2010-03-01 00:00:00 EST - P+0Y2M0DT0H0M0S = **2010-01-01 00:00:00 EST** test_bug_49081__20: SUB: 2010-03-01 00:00:00 EST - P+0Y0M29DT0H0M0S = **2010-01-31 00:00:00 EST** -test_bug_49081__21: SUB: 2010-03-27 00:00:00 EDT - P+0Y1M24DT0H0M0S = **2010-01-31 00:00:00 EST** -test_bug_49081__22: SUB: 2010-03-28 00:00:00 EDT - P+0Y1M25DT0H0M0S = **2010-01-31 00:00:00 EST** -test_bug_49081__23: SUB: 2010-03-29 00:00:00 EDT - P+0Y1M26DT0H0M0S = **2010-01-31 00:00:00 EST** -test_bug_49081__24: SUB: 2010-03-30 00:00:00 EDT - P+0Y1M27DT0H0M0S = **2010-01-31 00:00:00 EST** +test_bug_49081__21: SUB: 2010-03-27 00:00:00 EDT - P+0Y1M24DT0H0M0S = **2010-02-03 00:00:00 EST** +test_bug_49081__22: SUB: 2010-03-28 00:00:00 EDT - P+0Y1M25DT0H0M0S = **2010-02-03 00:00:00 EST** +test_bug_49081__23: SUB: 2010-03-29 00:00:00 EDT - P+0Y1M26DT0H0M0S = **2010-02-03 00:00:00 EST** +test_bug_49081__24: SUB: 2010-03-30 00:00:00 EDT - P+0Y1M27DT0H0M0S = **2010-02-03 00:00:00 EST** test_bug_49081__25: SUB: 2010-03-31 00:00:00 EDT - P+0Y2M0DT0H0M0S = **2010-01-31 00:00:00 EST** test_bug_49081__26: SUB: 2010-03-31 00:00:00 EDT - P+0Y2M1DT0H0M0S = **2010-01-30 00:00:00 EST** test_bug_49081__27: SUB: 2009-01-31 00:00:00 EST - P+0Y0M30DT0H0M0S = **2009-01-01 00:00:00 EST** @@ -62,11 +62,11 @@ test_bug_49081_negative__17: SUB: 2010-01-28 00:00:00 EST - P-0Y1M0DT0H0M0S = **2010-02-28 00:00:00 EST** test_bug_49081_negative__18: SUB: 2010-01-27 00:00:00 EST - P-0Y1M1DT0H0M0S = **2010-02-28 00:00:00 EST** test_bug_49081_negative__19: SUB: 2010-01-01 00:00:00 EST - P-0Y2M0DT0H0M0S = **2010-03-01 00:00:00 EST** -test_bug_49081_negative__20: SUB: 2010-01-31 00:00:00 EST - P-0Y1M1DT0H0M0S = **2010-03-01 00:00:00 EST** -test_bug_49081_negative__21: SUB: 2010-01-31 00:00:00 EST - P-0Y1M27DT0H0M0S = **2010-03-27 00:00:00 EDT** -test_bug_49081_negative__22: SUB: 2010-01-31 00:00:00 EST - P-0Y1M28DT0H0M0S = **2010-03-28 00:00:00 EDT** -test_bug_49081_negative__23: SUB: 2010-01-31 00:00:00 EST - P-0Y1M29DT0H0M0S = **2010-03-29 00:00:00 EDT** -test_bug_49081_negative__24: SUB: 2010-01-31 00:00:00 EST - P-0Y1M30DT0H0M0S = **2010-03-30 00:00:00 EDT** +test_bug_49081_negative__20: SUB: 2010-01-31 00:00:00 EST - P-0Y1M1DT0H0M0S = **2010-03-04 00:00:00 EST** +test_bug_49081_negative__21: SUB: 2010-01-31 00:00:00 EST - P-0Y1M27DT0H0M0S = **2010-03-30 00:00:00 EDT** +test_bug_49081_negative__22: SUB: 2010-01-31 00:00:00 EST - P-0Y1M28DT0H0M0S = **2010-03-31 00:00:00 EDT** +test_bug_49081_negative__23: SUB: 2010-01-31 00:00:00 EST - P-0Y1M29DT0H0M0S = **2010-04-01 00:00:00 EDT** +test_bug_49081_negative__24: SUB: 2010-01-31 00:00:00 EST - P-0Y1M30DT0H0M0S = **2010-04-02 00:00:00 EDT** test_bug_49081_negative__25: SUB: 2010-01-31 00:00:00 EST - P-0Y2M0DT0H0M0S = **2010-03-31 00:00:00 EDT** test_bug_49081_negative__26: SUB: 2010-01-30 00:00:00 EST - P-0Y2M1DT0H0M0S = **2010-03-31 00:00:00 EDT** test_bug_49081_negative__27: SUB: 2009-01-01 00:00:00 EST - P-0Y0M30DT0H0M0S = **2009-01-31 00:00:00 EST** Modified: php/php-src/trunk/ext/date/tests/DateTime_data-dates.inc =================================================================== --- php/php-src/trunk/ext/date/tests/DateTime_data-dates.inc 2011-08-23 15:43:40 UTC (rev 315375) +++ php/php-src/trunk/ext/date/tests/DateTime_data-dates.inc 2011-08-23 16:40:19 UTC (rev 315376) @@ -20,6 +20,7 @@ echo "test_years_positive__7_by_1_day: "; examine_diff('2007-02-08', '2000-02-07', 'P+7Y0M1DT0H0M0S', 2558); +// NOTE: sub() produces different answer. echo "test_years_positive__6_shy_1_day: "; examine_diff('2007-02-06', '2000-02-07', 'P+6Y11M30DT0H0M0S', 2556); @@ -48,6 +49,7 @@ echo "test_years_negative__7_by_1_day: "; examine_diff('2000-02-07', '2007-02-08', 'P-7Y0M1DT0H0M0S', 2558); +// NOTE: sub() produces different answer. echo "test_years_negative__6_shy_1_day: "; examine_diff('2000-02-07', '2007-02-06', 'P-6Y11M28DT0H0M0S', 2556); Modified: php/php-src/trunk/ext/date/tests/DateTime_data-february.inc =================================================================== --- php/php-src/trunk/ext/date/tests/DateTime_data-february.inc 2011-08-23 15:43:40 UTC (rev 315375) +++ php/php-src/trunk/ext/date/tests/DateTime_data-february.inc 2011-08-23 16:40:19 UTC (rev 315376) @@ -71,15 +71,19 @@ echo "test_bug_49081__20: "; examine_diff('2010-03-01', '2010-01-31', 'P+0Y0M29DT0H0M0S', 29); +// NOTE: sub() produces different answer. echo "test_bug_49081__21: "; examine_diff('2010-03-27', '2010-01-31', 'P+0Y1M24DT0H0M0S', 55); +// NOTE: sub() produces different answer. echo "test_bug_49081__22: "; examine_diff('2010-03-28', '2010-01-31', 'P+0Y1M25DT0H0M0S', 56); +// NOTE: sub() produces different answer. echo "test_bug_49081__23: "; examine_diff('2010-03-29', '2010-01-31', 'P+0Y1M26DT0H0M0S', 57); +// NOTE: sub() produces different answer. echo "test_bug_49081__24: "; examine_diff('2010-03-30', '2010-01-31', 'P+0Y1M27DT0H0M0S', 58); @@ -168,18 +172,23 @@ echo "test_bug_49081_negative__19: "; examine_diff('2010-01-01', '2010-03-01', 'P-0Y2M0DT0H0M0S', 59); +// NOTE: sub() produces different answer. echo "test_bug_49081_negative__20: "; examine_diff('2010-01-31', '2010-03-01', 'P-0Y1M1DT0H0M0S', 29); +// NOTE: sub() produces different answer. echo "test_bug_49081_negative__21: "; examine_diff('2010-01-31', '2010-03-27', 'P-0Y1M27DT0H0M0S', 55); +// NOTE: sub() produces different answer. echo "test_bug_49081_negative__22: "; examine_diff('2010-01-31', '2010-03-28', 'P-0Y1M28DT0H0M0S', 56); +// NOTE: sub() produces different answer. echo "test_bug_49081_negative__23: "; examine_diff('2010-01-31', '2010-03-29', 'P-0Y1M29DT0H0M0S', 57); +// NOTE: sub() produces different answer. echo "test_bug_49081_negative__24: "; examine_diff('2010-01-31', '2010-03-30', 'P-0Y1M30DT0H0M0S', 58); Modified: php/php-src/trunk/ext/date/tests/DateTime_sub-dates.phpt =================================================================== --- php/php-src/trunk/ext/date/tests/DateTime_sub-dates.phpt 2011-08-23 15:43:40 UTC (rev 315375) +++ php/php-src/trunk/ext/date/tests/DateTime_sub-dates.phpt 2011-08-23 16:40:19 UTC (rev 315376) @@ -14,7 +14,7 @@ test__7: SUB: 2009-01-14 00:00:00 EST - P+0Y0M7DT0H0M0S = **2009-01-07 00:00:00 EST** test_years_positive__7_by_0_day: SUB: 2007-02-07 00:00:00 EST - P+7Y0M0DT0H0M0S = **2000-02-07 00:00:00 EST** test_years_positive__7_by_1_day: SUB: 2007-02-08 00:00:00 EST - P+7Y0M1DT0H0M0S = **2000-02-07 00:00:00 EST** -test_years_positive__6_shy_1_day: SUB: 2007-02-06 00:00:00 EST - P+6Y11M30DT0H0M0S = **2000-02-07 00:00:00 EST** +test_years_positive__6_shy_1_day: SUB: 2007-02-06 00:00:00 EST - P+6Y11M30DT0H0M0S = **2000-02-05 00:00:00 EST** test_years_positive__7_by_1_month: SUB: 2007-03-07 00:00:00 EST - P+7Y1M0DT0H0M0S = **2000-02-07 00:00:00 EST** test_years_positive__6_shy_1_month: SUB: 2007-01-07 00:00:00 EST - P+6Y11M0DT0H0M0S = **2000-02-07 00:00:00 EST** test_years_positive__7_by_1_month_split_newyear: SUB: 2007-01-07 00:00:00 EST - P+7Y1M0DT0H0M0S = **1999-12-07 00:00:00 EST** @@ -22,7 +22,7 @@ test_negative__7: SUB: 2009-01-07 00:00:00 EST - P-0Y0M7DT0H0M0S = **2009-01-14 00:00:00 EST** test_years_negative__7_by_0_day: SUB: 2000-02-07 00:00:00 EST - P-7Y0M0DT0H0M0S = **2007-02-07 00:00:00 EST** test_years_negative__7_by_1_day: SUB: 2000-02-07 00:00:00 EST - P-7Y0M1DT0H0M0S = **2007-02-08 00:00:00 EST** -test_years_negative__6_shy_1_day: SUB: 2000-02-07 00:00:00 EST - P-6Y11M28DT0H0M0S = **2007-02-06 00:00:00 EST** +test_years_negative__6_shy_1_day: SUB: 2000-02-07 00:00:00 EST - P-6Y11M28DT0H0M0S = **2007-02-04 00:00:00 EST** test_years_negative__7_by_1_month: SUB: 2000-02-07 00:00:00 EST - P-7Y1M0DT0H0M0S = **2007-03-07 00:00:00 EST** test_years_negative__6_shy_1_month: SUB: 2000-02-07 00:00:00 EST - P-6Y11M0DT0H0M0S = **2007-01-07 00:00:00 EST** test_years_negative__7_by_1_month_split_newyear: SUB: 1999-12-07 00:00:00 EST - P-7Y1M0DT0H0M0S = **2007-01-07 00:00:00 EST** Modified: php/php-src/trunk/ext/date/tests/DateTime_sub-february.phpt =================================================================== --- php/php-src/trunk/ext/date/tests/DateTime_sub-february.phpt 2011-08-23 15:43:40 UTC (rev 315375) +++ php/php-src/trunk/ext/date/tests/DateTime_sub-february.phpt 2011-08-23 16:40:19 UTC (rev 315376) @@ -31,10 +31,10 @@ test_bug_49081__18: SUB: 2010-02-28 00:00:00 EST - P+0Y1M1DT0H0M0S = **2010-01-27 00:00:00 EST** test_bug_49081__19: SUB: 2010-03-01 00:00:00 EST - P+0Y2M0DT0H0M0S = **2010-01-01 00:00:00 EST** test_bug_49081__20: SUB: 2010-03-01 00:00:00 EST - P+0Y0M29DT0H0M0S = **2010-01-31 00:00:00 EST** -test_bug_49081__21: SUB: 2010-03-27 00:00:00 EDT - P+0Y1M24DT0H0M0S = **2010-01-31 00:00:00 EST** -test_bug_49081__22: SUB: 2010-03-28 00:00:00 EDT - P+0Y1M25DT0H0M0S = **2010-01-31 00:00:00 EST** -test_bug_49081__23: SUB: 2010-03-29 00:00:00 EDT - P+0Y1M26DT0H0M0S = **2010-01-31 00:00:00 EST** -test_bug_49081__24: SUB: 2010-03-30 00:00:00 EDT - P+0Y1M27DT0H0M0S = **2010-01-31 00:00:00 EST** +test_bug_49081__21: SUB: 2010-03-27 00:00:00 EDT - P+0Y1M24DT0H0M0S = **2010-02-03 00:00:00 EST** +test_bug_49081__22: SUB: 2010-03-28 00:00:00 EDT - P+0Y1M25DT0H0M0S = **2010-02-03 00:00:00 EST** +test_bug_49081__23: SUB: 2010-03-29 00:00:00 EDT - P+0Y1M26DT0H0M0S = **2010-02-03 00:00:00 EST** +test_bug_49081__24: SUB: 2010-03-30 00:00:00 EDT - P+0Y1M27DT0H0M0S = **2010-02-03 00:00:00 EST** test_bug_49081__25: SUB: 2010-03-31 00:00:00 EDT - P+0Y2M0DT0H0M0S = **2010-01-31 00:00:00 EST** test_bug_49081__26: SUB: 2010-03-31 00:00:00 EDT - P+0Y2M1DT0H0M0S = **2010-01-30 00:00:00 EST** test_bug_49081__27: SUB: 2009-01-31 00:00:00 EST - P+0Y0M30DT0H0M0S = **2009-01-01 00:00:00 EST** @@ -62,11 +62,11 @@ test_bug_49081_negative__17: SUB: 2010-01-28 00:00:00 EST - P-0Y1M0DT0H0M0S = **2010-02-28 00:00:00 EST** test_bug_49081_negative__18: SUB: 2010-01-27 00:00:00 EST - P-0Y1M1DT0H0M0S = **2010-02-28 00:00:00 EST** test_bug_49081_negative__19: SUB: 2010-01-01 00:00:00 EST - P-0Y2M0DT0H0M0S = **2010-03-01 00:00:00 EST** -test_bug_49081_negative__20: SUB: 2010-01-31 00:00:00 EST - P-0Y1M1DT0H0M0S = **2010-03-01 00:00:00 EST** -test_bug_49081_negative__21: SUB: 2010-01-31 00:00:00 EST - P-0Y1M27DT0H0M0S = **2010-03-27 00:00:00 EDT** -test_bug_49081_negative__22: SUB: 2010-01-31 00:00:00 EST - P-0Y1M28DT0H0M0S = **2010-03-28 00:00:00 EDT** -test_bug_49081_negative__23: SUB: 2010-01-31 00:00:00 EST - P-0Y1M29DT0H0M0S = **2010-03-29 00:00:00 EDT** -test_bug_49081_negative__24: SUB: 2010-01-31 00:00:00 EST - P-0Y1M30DT0H0M0S = **2010-03-30 00:00:00 EDT** +test_bug_49081_negative__20: SUB: 2010-01-31 00:00:00 EST - P-0Y1M1DT0H0M0S = **2010-03-04 00:00:00 EST** +test_bug_49081_negative__21: SUB: 2010-01-31 00:00:00 EST - P-0Y1M27DT0H0M0S = **2010-03-30 00:00:00 EDT** +test_bug_49081_negative__22: SUB: 2010-01-31 00:00:00 EST - P-0Y1M28DT0H0M0S = **2010-03-31 00:00:00 EDT** +test_bug_49081_negative__23: SUB: 2010-01-31 00:00:00 EST - P-0Y1M29DT0H0M0S = **2010-04-01 00:00:00 EDT** +test_bug_49081_negative__24: SUB: 2010-01-31 00:00:00 EST - P-0Y1M30DT0H0M0S = **2010-04-02 00:00:00 EDT** test_bug_49081_negative__25: SUB: 2010-01-31 00:00:00 EST - P-0Y2M0DT0H0M0S = **2010-03-31 00:00:00 EDT** test_bug_49081_negative__26: SUB: 2010-01-30 00:00:00 EST - P-0Y2M1DT0H0M0S = **2010-03-31 00:00:00 EDT** test_bug_49081_negative__27: SUB: 2009-01-01 00:00:00 EST - P-0Y0M30DT0H0M0S = **2009-01-31 00:00:00 EST**
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php