forum.coppermine-gallery.net
Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: itang on April 26, 2005, 05:22:51 pm
-
I am using PHP Version 4.2.2. Try to modify the date format of coppermine 1.4.1 with the format %Y-%b-%j.
The result should be like this: 2004-4-5
However, it came out like this: 2004-4-095
Thanks for your attention.
-
I'm not too sure this is a bug, but moving it anyway.
-
From php manual:
%j - day of the year as a decimal number (range 001 to 366)
Seems to be pretty much as expected.
-
I am using PHP Version 4.2.2. Try to modify the date format of coppermine 1.4.1 with the format %Y-%b-%j.
The result should be like this: 2004-4-5
However, it came out like this: 2004-4-095
Thanks for your attention.
That is actually correct. You are using 'j', which is the day of the year, not month.
%j - day of the year as a decimal number (range 001 to 366)
Change the j to an 'd' or 'e' and you will get what you want
Edit, nibbler beat me to it, but after typing it out, I posted it anyway lol.
-
It is my fault, I am so sorry to bring up this silly question.
The fact is I mixed up the function "date" - which "j" refer to "Day of the month without leading zeros" with the "strftime" function which "%j" refer to day of the year as a decimal number (range 001 to 366)
I am sorry again. :-[