|
Posted by Kimmo Laine on 02/05/07 11:38
"Gunnar G" <debian@comhem.se> wrote in message
news:agExh.31203$E02.12820@newsb.telia.net...
>> Now this is just a guess, but if 'june' comes from an array starting with
>> zero, so that 0=january, then 4=may and 5=june, it propably should start
>> from 1=january and in that case 5 would actually be may... If that
>> doesn't
>> help, see the whole output of getdate with print_r() and post the result
>> here.
> How can any one start counting from something else than zero in computer
> applications?
When dates are prsented in a numeric format, like YYYY-MM-DD, the months are
1-12, not 0-11 and this is what getdate outputs. No one said it's an array
offset, it's the ordinal number of the month. Calendars were invented before
computers. ;)
> Thanks! I'm so very, very stupid.
I've been equally stupid once. That's how I knew what to suspect. Try
formatting dates with the php built-in function date() to avoid confusions
like that.
--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
http://outolempi.net/ahdistus/ - Satunnaisesti pδivittyvδ nettisarjis
spam@outolempi.net | rot13(xvzzb@bhgbyrzcv.arg)
Navigation:
[Reply to this message]
|