Edit report at http://bugs.php.net/bug.php?id=54117&edit=1

 ID:                 54117
 User updated by:    a dot borngesser at berlin dot de
 Reported by:        a dot borngesser at berlin dot de
 Summary:            Parameter 'z' false
 Status:             Open
 Type:               Feature/Change Request
 Package:            Date/time related
 Operating System:   Irrelevant
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

Is someone working on this issue or shut I open a new thread (and of
course in english this time)?


Previous Comments:
------------------------------------------------------------------------
[2011-02-28 11:29:03] a dot borngesser at berlin dot de

Sorry, my text now in english.

The parameter 'z' is false from its basic set-up.

The first day of the year is '1' not '0'.

I know, that the count starts with 0, but it would be better to change
the code of the parameter, than to leave it to the programmers.

(I had some cases where it was used simply as is. The results where
simply false, and when using it in a very basic way by just displaying
it, you don't think of a mistake.)

If a parameter is for returning the "incremented day of the year", it
should do exactly this, and not the "incremented day of the year -1".

------------------------------------------------------------------------
[2011-02-28 11:11:34] paj...@php.net

Please report your bug in English.

------------------------------------------------------------------------
[2011-02-28 11:10:18] a dot borngesser at berlin dot de

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 this bug report at http://bugs.php.net/bug.php?id=54117&edit=1

Reply via email to