|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-04-30 15:05 UTC] derick@php.net
-Status: Open
+Status: Bogus
[2010-04-30 15:05 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 02:00:01 2025 UTC |
Description: ------------ I wrote a function to return an array that will consist of the key-value pair of all the month-number and 3 letter suffix of the month as 1=>Jan 2=>Feb 3=>Mar so on... The problem is the function works on all days except on month ends (for ex 31jan, 28feb, 31mar so on ) will display Mar of the key 2 and 3 as well Test script: --------------- please change the system date to a month end before running this code for ex i tested this code on 30 apt 2010 echo "<br>"; echo date("M",mktime(0,0,0,date(2),date("d"),date("Y"))); echo "<br>"; echo date("M",mktime(0,0,0,date(3),date("d"),date("Y"))); echo "<br>"; Expected result: ---------------- Mar Mar