From:             
Operating system: Irrelevant
PHP version:      Irrelevant
Package:          Date/time related
Bug Type:         Feature/Change Request
Bug description:Parameter 'z' false

Description:
------------
---

>From manual page: http://www.php.net/function.date#Parameter-Liste

---

Parameter ist im Grundaufbau falsch.

"z      Der Tag des Jahres (von 0 beginnend)    0 bis365"

                            ===============     = 



Der erste Tag des Jahres ist nicht '0' sondern '1'!

Natürlich ist es normal, das von 0 die Zählung beginnt, aber man sollte
evtl. bei einem Parameter dies intern gleich um +1 hochzählen und nicht
den Programmierern überlassen.

Ich habe jetzt schon mehrere Fälle gehabt, wo der Parameter direkt genutzt
wurde, was dann zu falschen Ergebnissen geführt hat.

Wenn ein Parameter den hochgezählten Tag des Jahres angeben soll, sollte
dies auch so sein und nicht 'der hochgezählte Tag des Jahres -1'.



Test script:
---------------
echo "Der 1.1. 2010 hatte die LOS#:  ".date ("z",mktime(0,0,0,1,1,2010));









Expected result:
----------------
Der 1.1. 2010 hatte die LOS#: 1

Actual result:
--------------
Der 1.1. 2010 hatte die LOS#: 0

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

Reply via email to