Doc #46712 [Csd]: strftime : %p tag does "AM/PM" and not "am/pm"
| From: | rquadling@php.net | Date: | Fri, 04 Feb 2011 11:00:46 +0000 |
| Subject: | Doc #46712 [Csd]: strftime : %p tag does "AM/PM" and not "am/pm" | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-5915@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=46712&edit=1
ID: 46712
Updated by: rquadling@php.net
Reported by: evaisse at gmail dot com
Summary: strftime : %p tag does "AM/PM" and not "am/pm"
Status: Closed
Type: Documentation Problem
Package: Documentation problem
Operating System: ubuntu/linux
PHP Version: Irrelevant
-Assigned To:
+Assigned To: rquadling
Block user comment: N
Private report: N
New Comment:
Can you run the example at
http://docs.php.net/manual/en/function.strftime.php#example-637.
This
will show
you all the formats that your operating system can provide and the
current
values.
I'm on Windows and I've tested V5.0.0 to V5.3.5 (77 versions including
alpha and
RCs). %P is not supported and %p is always uppercase AM or PM.
You may find your OS reports something different. Take careful notice of
http://docs.php.net/manual/en/function.strftime.php#refsect1-function.strftime-
errors. The output is OS dependent.
Previous Comments:
------------------------------------------------------------------------
[2011-02-03 21:20:11] ssanders at bookmasters dot com
I am on PHP 5.2.10, and %p returns lowercase am/pm, contrary to current
docs..?
------------------------------------------------------------------------
[2008-11-28 23:16:33] danbrown@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
------------------------------------------------------------------------
[2008-11-28 16:51:09] evaisse at gmail dot com
Description:
------------
doc say :
%p - either
am' or pm' according to the given time value, or the
corresponding strings for the current locale
Must be corrected said in the comments :
%p - either AM' or PM' according to the given time value, or the
corresponding strings for the current locale (note result is in
capitals)
%P - either am' or pm' according to the given time value, or the
corresponding strings for the current locale (note result is in lower
case)
Very vicious bug by the way.
Reproduce code:
---------------
print strftime('%p',time()); // time before 12, must print 'am'
Expected result:
----------------
am
Actual result:
--------------
AM
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=46712&edit=1