#49481 [Opn->Bgs]: strftime format documentation error

From: Date: Sun, 06 Sep 2009 10:41:26 +0000
Subject: #49481 [Opn->Bgs]: strftime format documentation error
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-2734@lists.php.net to get a copy of this message
ID: 49481 Updated by: derick@php.net Reported By: liphtier at gmail dot com -Status: Open +Status: Bogus Bug Type: Documentation problem PHP Version: 5.2.10 New Comment: You are wrong. From the Linux manual: %p Either "AM" or "PM" according to the given time value, or the corresponding strings for the current locale. Noon is treated as "PM" and midnight as "AM". %P Like %p but in lowercase: "am" or "pm" or a corresponding string for the current locale. (GNU) In PHP: php -r "echo strftime('%p %P' );" AM am Previous Comments: ------------------------------------------------------------------------ [2009-09-06 10:26:22] liphtier at gmail dot com Description: ------------ In the manual page: function.strftime stated > %p UPPER-CASE 'AM' or 'PM' based on the given time > Example: AM for 00:31, PM for 22:23 > %P lower-case 'am' or 'pm' based on the given time > Example: am for 00:31, pm for 22:23 the actual format is exactly wise versa: %p is for lower-case and %P is for UPPER-CASE. Reproduce code: --------------- --- From manual page: function.strftime --- Expected result: ---------------- > %P UPPER-CASE 'AM' or 'PM' based on the given time > Example: AM for 00:31, PM for 22:23 > %p lower-case 'am' or 'pm' based on the given time > Example: am for 00:31, pm for 22:23 Actual result: -------------- > %p UPPER-CASE 'AM' or 'PM' based on the given time > Example: AM for 00:31, PM for 22:23 > %P lower-case 'am' or 'pm' based on the given time > Example: am for 00:31, pm for 22:23 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49481&edit=1

« previous php.doc.bugs (#2734) next »