Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > How do I display dates in a format consistent with the user's computer?

Reply
Thread Tools

How do I display dates in a format consistent with the user's computer?

 
 
ted
Guest
Posts: n/a
 
      12-10-2004
I see many sites that display a date in the format of 02/03/04. Which number
is the year, month and day? Who knows.

Is there a way for me to query the OS's date format and display a date
consistent with that format?

Thanks


 
Reply With Quote
 
 
 
 
Richard
Guest
Posts: n/a
 
      12-10-2004
ted wrote:

> I see many sites that display a date in the format of 02/03/04. Which
> number is the year, month and day? Who knows.


> Is there a way for me to query the OS's date format and display a date
> consistent with that format?


> Thanks


Display them all and let them figure it out.


 
Reply With Quote
 
 
 
 
Mark Parnell
Guest
Posts: n/a
 
      12-10-2004
Previously in alt.html, ted <(E-Mail Removed)> said:

> Is there a way for me to query the OS's date format and display a date
> consistent with that format?


Yeah sure, check my OS settings. Why not change a few while you're
there?

IOW, no. It would be a massive security risk.

--
Mark Parnell
http://www.clarkecomputers.com.au
 
Reply With Quote
 
Karl Core
Guest
Posts: n/a
 
      12-10-2004

"ted" <(E-Mail Removed)> wrote in message
news:kl7ud.45$Mp4.22@lakeread07...
>I see many sites that display a date in the format of 02/03/04. Which
>number is the year, month and day? Who knows.
>
> Is there a way for me to query the OS's date format and display a date
> consistent with that format?
>


You think the visitor doesn't know what day it is, and/ or cannot get that
from their own computer?
Are they coming to your site to find out what day it is, or are they coming
for a different reason?

--
-Karl Core
Please Support "Project Boneyard":
http://www.insurgence.net/info.aspx?...&item=boneyard


 
Reply With Quote
 
Greg Schmidt
Guest
Posts: n/a
 
      12-10-2004
On Thu, 9 Dec 2004 21:06:16 -0500, Karl Core wrote:

> "ted" <(E-Mail Removed)> wrote in message
> news:kl7ud.45$Mp4.22@lakeread07...
>>I see many sites that display a date in the format of 02/03/04. Which
>>number is the year, month and day? Who knows.


Well, I know that your example should be March 4, 2002, but many (who
have never had to write a routine to sort date strings) would disagree.

>> Is there a way for me to query the OS's date format and display a date
>> consistent with that format?

>
> You think the visitor doesn't know what day it is, and/ or cannot get that
> from their own computer?
> Are they coming to your site to find out what day it is, or are they coming
> for a different reason?


What about a travel site, where they are asking you to confirm your
itinerary? A bank confirming the date of a future bill payment? A
history site listing famous battles, a sports team's schedule, the date
on an archived press release. Many examples where the date shown is not
today's date.

I personally would prefer to see the date given as Dec 10, 2004 (or, if
space is really that critical, Dec10/04 fits into the same 8 chars as
the OP's example).

--
Greg Schmidt http://www.velocityreviews.com/forums/(E-Mail Removed)
Trawna Publications http://www.trawna.com/
 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      12-10-2004
ted wrote:

> I see many sites that display a date in the format of 02/03/04. Which
> number is the year, month and day? Who knows.


2nd February 2004 leaves no room for misunderstanding (unless the user
doesn't read that language - in which case why are they reading the
document anyway?

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
 
Reply With Quote
 
Neal
Guest
Posts: n/a
 
      12-10-2004
On Thu, 9 Dec 2004 20:55:12 -0500, ted <(E-Mail Removed)>
wrote:

> I see many sites that display a date in the format of 02/03/04. Which
> number
> is the year, month and day? Who knows.
>
> Is there a way for me to query the OS's date format and display a date
> consistent with that format?


Never heard of a workable method. Best practice - state month explicitly,
state year in full form. Use your correct local format.

04 March 2002
March 4, 2002
etc.
 
Reply With Quote
 
BJ in Texas
Guest
Posts: n/a
 
      12-10-2004
ted wrote:
|| I see many sites that display a date in the format of
|| 02/03/04. Which number is the year, month and day? Who knows.
||
|| Is there a way for me to query the OS's date format and
|| display a date consistent with that format?
||
|| Thanks

Try 02 Mar 04 or 03 Feb 04, most can figure that out and it only
takes one more space.

BJ


 
Reply With Quote
 
steven
Guest
Posts: n/a
 
      12-10-2004
"BJ in Texas" <(E-Mail Removed)> wrote in message
news:nRiud.42475$(E-Mail Removed). com...
> ted wrote:
> || I see many sites that display a date in the format of
> || 02/03/04. Which number is the year, month and day? Who knows.
> ||
> || Is there a way for me to query the OS's date format and
> || display a date consistent with that format?
> ||
> || Thanks
>
> Try 02 Mar 04 or 03 Feb 04, most can figure that out and it only
> takes one more space.
>
> BJ
>


ISO8601: 2004-03-02

http://www.cl.cam.ac.uk/~mgk25/iso-time.html
http://www.saqqara.demon.co.uk/datefmt.htm
http://www.hermetic.ch/cal_stud/formats.htm


 
Reply With Quote
 
steven
Guest
Posts: n/a
 
      12-10-2004

"Greg Schmidt" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Thu, 9 Dec 2004 21:06:16 -0500, Karl Core wrote:
>
> > "ted" <(E-Mail Removed)> wrote in message
> > news:kl7ud.45$Mp4.22@lakeread07...
> >>I see many sites that display a date in the format of 02/03/04. Which
> >>number is the year, month and day? Who knows.

>
> Well, I know that your example should be March 4, 2002, but many (who
> have never had to write a routine to sort date strings) would disagree.
>


You do? I think it could be any one of
March 4, 2002
March 2, 2004
February 3, 2004.

> >> Is there a way for me to query the OS's date format and display a date
> >> consistent with that format?

> >
> > You think the visitor doesn't know what day it is, and/ or cannot get

that
> > from their own computer?
> > Are they coming to your site to find out what day it is, or are they

coming
> > for a different reason?

>
> What about a travel site, where they are asking you to confirm your
> itinerary? A bank confirming the date of a future bill payment? A
> history site listing famous battles, a sports team's schedule, the date
> on an archived press release. Many examples where the date shown is not
> today's date.
>
> I personally would prefer to see the date given as Dec 10, 2004 (or, if
> space is really that critical, Dec10/04 fits into the same 8 chars as
> the OP's example).
>


How about ISO8601: 2004-03-02

http://www.cl.cam.ac.uk/~mgk25/iso-time.html
http://www.saqqara.demon.co.uk/datefmt.htm
http://www.hermetic.ch/cal_stud/formats.htm


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Consistent ps/top output format Bart Van der Donck Perl Misc 3 08-16-2010 04:05 PM
Need to use dates earlier than 1900 (Time library says out of range for dates < 1900) me@benjaminarai.com Ruby 1 07-17-2007 02:25 PM
(const char *cp) and (char *p) are consistent type, (const char **cpp) and (char **pp) are not consistent lovecreatesbeauty C Programming 1 05-09-2006 08:01 AM
Dates dates dates dates... SQL and ASP.NET David Lozzi ASP .Net 1 09-30-2005 02:18 PM
Dates! Dates! Dates! PW ASP General 4 08-09-2004 04:42 PM



Advertisments