1

Topic: Datetime format

What about having the format_time() in /include/functions.php using a $pun_user['date_format']
instead of $pun_config['o_date_format'] variable.
Of course there must be an input text in the profile.php to have the user specify his own date-time format and also a new field in the punbb_users table.
Maybe in the Language Definitions the translator can put the preferred date and time representation for their language...

P.

Re: Datetime format

I don't think it's a good idea to allow individual users to choose (80% will screw it up), but I will consider the language pack thing.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Datetime format

In my continuing fight against localised date and time formats, I have decided not to do this. Here's a good read:

http://www.cl.cam.ac.uk/~mgk25/iso-time.html

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Datetime format

thing i don't understand about that is the theory is USA is MM/DD/YYYY europe is DD/MM/YYYY then they make a totally new one YYYY/MM/DD. why could they not just use DD/MM/YYYY wink since MM/DD/YYYY is obviously daft

Re: Datetime format

Because then you wouldn't be able to tell if the date was ISO standard or just "european".

The european standard has been YYYY-MM-DD as long as I can remember. Well, it was YY-MM-DD up until a few years ago (y2k anyone?), but I don't believe I have ever run into DD/MM/YYYY in Sweden. Maybe it's just you brits that have got it all backwards? :)

DD-MM-YYYY is odd anyway. Why start with the day? That's like telling time by starting with the seconds.

Don't even get me started on the whole AM/PM thing.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

6 (edited by Frank H 2004-09-20 22:38)

Re: Datetime format

if you read the page, it's easy to misread MM/DD/YYYY and DD/MM/YYYY ... with YYYY/MM/DD you don't have any other option ... thus you wont risk misreading the date, when you don't know what format it is...

Edit: Rickard was faster, and I didn't refresh the page big_smile
Yep on the page it is some info about british date aswell ...

7

Re: Datetime format

I'm glad I'm not the only one who can't see the logic in the American date order. Both the others being a logical progression in the size of the units.

On the other hand when I see 2001-11-02 I tend to read
Year 2001, Date 11th Februrary

Re: Datetime format

falling order ... year is larger than month that is larger than day, that is larger than hour that is larger than minute that is larger than seconds and so on ...

2005-09-12 23:48:12.0344 is IMHO quite clear ... but I'm a Swede so I have used it for so long I remember