From:             sankee at aol dot com
Operating system: linux
PHP version:      4.4.4
PHP Bug Type:     Date/time related
Bug description:  'D' Day of the week function not working properly

Description:
------------
According to the manual, when using date_format, %D should produce a 3
letter representation of the day of the week ('wed' for example).  But for
me, it produces the day of the month with a suffix (23rd for example).

Also, %r should produce the rfc-822 date-time format ('Wed, 23 Jan 2007
12:00:00 EST' for example).  This isn't working for me either.  Instead it
produces '12:00:00 PM'.

Am I missing something or is this not working right?





Reproduce code:
---------------
MY CODE ATTEMPTING TO USE %D:
SELECT news_title
, news_description
, news_id
, date_format(added, '%D, %d %M %Y %T') AS added
from news
ORDER BY added DESC
LIMIT 0,5

MY CODE ATTEMPTING TO USE %r:
SELECT news_title
, news_description
, news_id
, date_format(added, '%r') AS added
from news
ORDER BY added DESC
LIMIT 0,5



Expected result:
----------------
Wed



Wed, 02 Oct 2002 08:00:00 EST

Actual result:
--------------
23rd

12:00:00 PM

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

Reply via email to