View Full Version : Two date formats
markrt
09-15-2001, 05:50 AM
Hi
Is it possible to have the date format displayed differently for users in other country's.
I need the users to be able to pick what format they want displayed, something like US format or the UK format to be checked in the "User settings"
Thanks
Mark
Prolex
09-15-2001, 06:22 AM
This feature is already implemented in vbulletin 2.0.3.
under USERCP > Edit Options
Admin
09-15-2001, 07:11 AM
Actually I think he wants different date formats for each user, so a user from Israel could have day-month-year (like we use here).
markrt
09-15-2001, 11:45 AM
Hi
As FireFly said:
I need different date formats for each user, so a user from the UK can have have "DD-MM-YY" and a user from the US can have "MM-DD-YY"
If there isnt a hack for this perhaps I can make different styles for each Country? But where do I change the Date $s.
Thanks
Mark
Admin
09-15-2001, 01:19 PM
Date and time formats can't be set per-style.
You can only change them in the contorl panel.
But this is a great idea, I'm sure someone will make it (not too hard at all).
I dont have a use for this hack, but if i get bored, im sure ill hack around for you :)
Good luck!
Admin
09-15-2001, 05:29 PM
Ok, this is very very very easy to do.
Please give me a full list of date formats, and if you want also time formats to use.
I'll get it done in no time. :)
ozone2000
09-15-2001, 06:09 PM
date formats:
*=the 4 lettered word means that it should be shown in full length, that is if its YYYY, its 2001, but if its MMMM, it should be September, the same goes for DDDD, then it should show Saturday... etc, if you know what i mean.
---------------
The Month-Day-Year format:
---------------
MM.DD.YY
MMMM.DD.YY*
MMMM.DDDD.YY*
MMMM.DDDD.YYYY*
MM,DD,YY
MMMM,DD,YY*
MMMM,DDDD,YY*
MMMM,DDDD,YYYY*
MM-DD-YY
MMMM-DD-YY*
MMMM-DDDD-YY*
MMMM-DDDD-YYYY*
MM/DD/YY
MMMM/DD/YY*
MMMM/DDDD/YY*
MMMM/DDDD/YYYY*
MMDDYY
MMMMDDYY*
MMMMDDDDYY*
MMMMDDDDYYYY*
---------------
The Day-Month-Year format:
---------------
DD.MM.YY
DD.MMMM.YY*
DDDD.MMMM.YY*
DDDD.MMMM.YYYY*
DD,MM,YY
DD,MMMM,YY*
DDDD,MMMM,YY*
DDDD,MMMM,YYYY*
DD-MM-YY
DD-MMMM-YY*
DDDD-MMMM-YY*
DDDD-MMMM-YYYY*
DD/MM/YY
DD/MMMM/YY*
DDDD/MMMM/YY*
DDDD/MMMM/YYYY*
DDMMYY
DDMMMMYY*
DDDDMMMMYY*
DDDDMMMMYYYY*
---------------
The Year-Month-Day format:
---------------
YY.MM.DD
YY.MMMM.DD*
YY.MMMM.DDDD*
YYYY.MMMM.DDDD*
YY,MM,DD
YY,MMMM,DD*
YY,MMMM,DDDD*
YYYY,MMMM,DDDD*
YY-MM-DD
YY-MMMM-DD*
YY-MMMM-DDDD*
YYYY-MMMM-DDDD*
YY/MM/DD
YY/MMMM/DD*
YY/MMMM/DDDD*
YYYY/MMMM/DDDD*
MMDDYY
YYMMMMDD*
YYMMMMDDDD*
YYYYMMMMDDDD*
---------------
... i dont know if there is any other date formats, but these are the ones i know!
Admin
09-15-2001, 06:12 PM
Thank you VERY much! :)
Admin
09-15-2001, 06:18 PM
Actually there are a lot more:
http://www.php.net/manual/en/function.date.php
You can use the day name, month name, etc.
I'll have to research more. :)
ozone2000
09-15-2001, 06:23 PM
HOLY GHOST IN A BOTTLE!!!
i didn't think that there were THAT many date format thingys
... im outcounted!
Admin
09-15-2001, 06:31 PM
Hehe. :p
I'm gonna offer use of seconds, that'd be super cool!
(you know, for "hey, you posted 2 seconds after me!" :D)
Admin
09-15-2001, 06:38 PM
OK, this what I got so far (and I think that's it):
m-d-y - 04-25-98
m-d-Y - 04-25-1998
m.d.y - 04.25.98
m.d.Y - 04.25.1998
d-m-y - 25-04-98
d-m-Y - 25-04-1998
d.m.y - 25.04.98
d.m.Y - 25.04.1998
F jS, Y - April 25th, 1998
l, F jS, Y - Saturday, April 25th, 1998
jS F Y - 25th April 1998
l, jS F Y - Saturday, 25th April 1998
h:i a - 08:15 pm
h:i:s a - 08:15:48 pm
h:i A - 08:15 PM
h:i:s A - 08:15:48 PM
H:i - 20:15
H:i:s - 20:15:48
ozone2000
09-15-2001, 06:40 PM
well, you read my mind, thats for sure!
markrt
09-15-2001, 07:20 PM
Sorry lads this does look like a lot work but I think it would help a lot of users of forums that are worldwide.
I know that the US users on my forum would be grateful, as they have trouble understanding the format that I have the date set to.
I have it set to the UK format as I have a few more users from the UK and Europe.
I wish I could help but I dont have a clue where to start?
Thank for any help you can offer.
Mark
Admin
09-16-2001, 09:25 AM
I already started working on this.
Should be done in a few days.
Admin
09-16-2001, 11:09 AM
Almost done... :)
Admin
09-16-2001, 11:35 AM
Woo :)
http://www.vbulletin.com/forum/showthread.php?s=&threadid=28193
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.