From:             nuke at psu dot edu
Operating system: All?
PHP version:      5.3SVN-2010-01-14 (snap)
PHP Bug Type:     Date/time related
Bug description:  Missing days in Sept 1752

Description:
------------
In ext/date/lib/interval.c around line 58, there should be a flag to 
test for years before, say, 1753, and throw a warning for people to use 
the Calendar functions, assuming those functions are doing it correctly.

I'd check the Calendar functions today, esp. GregoriantoJD, except that 
it's already 3am here.  Besides, that'd be a different test.

Here's one webpage about the issue I found in 1752:
http://www.genealogytoday.com/columns/everyday/030902.html



Reproduce code:
---------------
$one = new DateTime("1752-09-02 00:00:00"); 
$two = new DateTime("1752-09-14 00:00:00");
$diff = $one->diff($two);
echo $diff->days."=1"; 


Expected result:
----------------
1=1

Actual result:
--------------
12=1

-- 
Edit bug report at http://bugs.php.net/?id=50744&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=50744&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=50744&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=50744&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=50744&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=50744&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=50744&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=50744&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=50744&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=50744&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=50744&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=50744&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=50744&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=50744&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=50744&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=50744&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=50744&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=50744&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=50744&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=50744&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=50744&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=50744&r=mysqlcfg

Reply via email to