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

 ID:                 30034
 Comment by:         loveme99hebe at yahoo dot com dot tw
 Reported by:        michael at michaelthompson dot org
 Summary:            date('zS') does not always return the correct value
 Status:             Bogus
 Type:               Bug
 Package:            Date/time related
 Operating System:   *
 PHP Version:        4.3.8
 Block user comment: N
 Private report:     N

 New Comment:

home add:443-J JALAN SULTAN KG BARU 34000 TAIPING,PERAK,MALAYSIA

I/C KAD:830617-08-6215


Previous Comments:
------------------------------------------------------------------------
[2004-09-09 08:09:57] der...@php.net

But it's not a bug. The S parameter uses the current day-of-the month to
generate the suffix (with the 'j' parameter), and not the
day-of-the-year value.



>From http://php.net/date:

S       English ordinal suffix for the day of the month, 2 characters    st, nd,
rd or th. Works well with j

------------------------------------------------------------------------
[2004-09-09 08:08:00] der...@php.net

Confirmed on Linux too, having a look now.

------------------------------------------------------------------------
[2004-09-09 06:37:17] michael at michaelthompson dot org

Description:
------------
date('zS') does not return the correct value on/above(?) day 251

Reproduce code:
---------------
date('zS'); # on (after ?) day 251

Expected result:
----------------
251st

Actual result:
--------------
251th


------------------------------------------------------------------------



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

Reply via email to