#30034 [Asn->Bgs]: date('zS') does not always return the correct value
| From: | derick@php.net | Date: | Thu, 09 Sep 2004 06:09:59 +0000 |
| Subject: | #30034 [Asn->Bgs]: date('zS') does not always return the correct value | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-65950@lists.php.net to get a copy of this message | ||
ID: 30034
Updated by: derick@php.net
Reported By: michael at michaelthompson dot org
-Status: Assigned
+Status: Bogus
Bug Type: Date/time related
Operating System: *
PHP Version: 4.3.8
Assigned To: derick
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2004-09-09 08:08:00] derick@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/?id=30034&edit=1