View Poll Results: The 2nd day of March 2004. Choose as many as you like.

Voters
31. You may not vote on this poll
  • 2004-03-02

    12 38.71%
  • 03/02/2004

    10 32.26%
  • 02.03.2004

    11 35.48%
  • 2004-Mar-02

    3 9.68%
  • Mar/02/2004

    5 16.13%
  • 02.Mar.2004

    9 29.03%
  • Other, please specify.

    8 25.81%
Multiple Choice Poll.

Thread: What is Your Preferred Date Format?

  1. #16
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    I like to have dates as DD/MM/YY, as you can see from my website:
    Dates

    I always put dates as DD/MM/YY unless otherwise stated. If you don't like this for some reason, then run the web pages through this perl script before you view them:
    Code:
    while(<>){s|(\d\d)/(\d\d)/(\d\d)|$2/$1/$3|g;print}
    or
    Code:
    perl -pe "s|(\d\d)/(\d\d)/(\d\d)|$2/$1/$3|g"
    It swaps the first two parts of a date, converting DD/MM/YY to MM/DD/YY and vise versa.
    I really don't like MM/DD/YY. It simply doesn't make sense, as someone has already said -- a day is a smaller unit of measurement than a month. But I have to deal with MM/DD/YY a lot, so I guess I'm used to it. "A body can get used to anything . . ."

    Again, if the date needs to be crystal clear I might put "March 2nd, 2004".
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  2. #17
    Math wizard
    Join Date
    Dec 2006
    Location
    USA
    Posts
    582
    Quote Originally Posted by Dave_Sinkula View Post
    Understood -- although using paragraph separators does help.

    Been there, done that got the T-shirt.

    The question was aimed more toward a consumer of a product, which I thought I had at least alluded to, in regard to an individual's personal preference.

    I know what I like, I know what I prefer; I know my list is far from exhaustive. The question is more or less, "What Do You Prefer?"

    [edit]I know it's in there somewhere, although fairly well hidden.[/edit]
    What I prefer most of the 3 formats is the "Mar 2, 2004" format as that's where my compatibility is the highest. Following that would the 03/02/2004 then the 20040302 format.
    High elevation is the best elevation. The higher, the better the view!
    My computer: XP Pro SP3, 3.4 GHz i7-2600K CPU (OC'd to 4 GHz), 4 GB DDR3 RAM, X-Fi Platinum sound, GeForce 460, 1920x1440 resolution, 1250 GB HDD space, Visual C++ 2008 Express

  3. #18
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    day. month. year, with month being either a number or a name. That's the German convention, so I prefer it.
    For international purposes, YYYY-MM-DD. Using the 4-digit year makes it clear that it starts with a year, and it's unambiguous: at least I've never seen YYYY-DD-MM before.
    MM/DD/YY is braindead.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #19
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    I guess I should like YY(YY)/MM/DD, for sorting reasons, but I normally go for DD/MM/YY(YY).

  5. #20
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    Quote Originally Posted by dwks View Post
    Again, if the date needs to be crystal clear I might put "March 2nd, 2004".
    Ah perhaps I have omitted relevant details.

    In addition, a time portion will consume either 5 or 6 characters on a 16-character line. With a separator, that gives you 9 or 10 characters for the date. If the text is longer than 16 characters, the text horizontally scrolls. An example might be seeing the date and an hour, with no minutes (well, until it scrolls).

    How might this affect your choice of date representation?

    Again, the frame of mind is such like a bank statement, email client, watch, PDA, event log, etc. In the end, a view of sequential items from most recent to least by date and time. And from a consumer perspective, not a techie one, unless that is also your consumer perspective.
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  6. #21
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Location
    Banks of the River Styx
    Posts
    902
    Depends on the situation. My preference, and the way I write it is: "M/D/YYYY"

    However, if I'm working with files, I prefer "YYYY-MM-DD", as this sorts. If only more people figured that out... then again, if only today's file managers were intelligent enough to recognize these situations. (Dates might be a little harder, but they could still place "Pic2.jpg" before "Pic10001.jpg"...)

    I really don't like MM/DD/YY. It simply doesn't make sense,
    Agreed, although I use it. If I had to guess, I'd say it had to do with most people saying dates "March 2, 2004" - MM/DD/YYYY, written out. You'd have to say instead, "2nd of March, 2004".

    If this is some product/application in which the date plays such a large part, anything wrong with allowing customization? You could always allow the user to choose. (Although perhaps that's why you want the top three or so...) Some boards allow date customization using PHP's date() function's format.
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

  7. #22
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    Quote Originally Posted by Cactus_Hugger View Post
    If this is some product/application in which the date plays such a large part, anything wrong with allowing customization? You could always allow the user to choose.
    Not at all, that's the point of this query.
    Quote Originally Posted by Cactus_Hugger View Post
    (Although perhaps that's why you want the top three or so...)
    Right now I think I've figured it into about 5 or 6 parameters that should give hundreds of options.

    But I'm looking for things I may have missed or not considered.
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  8. #23
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Quote Originally Posted by Cactus_Hugger View Post
    but they could still place "Pic2.jpg" before "Pic10001.jpg"...)
    Some do it. I think the XP Explorer claims to do that, and I know I've seen a Linux file manager do this, too, although I can't remember which one.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  9. #24
    Math wizard
    Join Date
    Dec 2006
    Location
    USA
    Posts
    582
    Quote Originally Posted by Dave_Sinkula View Post
    Ah perhaps I have omitted relevant details.

    In addition, a time portion will consume either 5 or 6 characters on a 16-character line. With a separator, that gives you 9 or 10 characters for the date. If the text is longer than 16 characters, the text horizontally scrolls. An example might be seeing the date and an hour, with no minutes (well, until it scrolls).

    How might this affect your choice of date representation?

    Again, the frame of mind is such like a bank statement, email client, watch, PDA, event log, etc. In the end, a view of sequential items from most recent to least by date and time. And from a consumer perspective, not a techie one, unless that is also your consumer perspective.
    Let's see, my "Mar 17, 2004" format is 12 characters. Wrap arounds, though they'd look odd, wouldn't affect me as I'd figure it out (and I'd even find it humorous as anything odd or unusual catches my attention).

    Do note that a 16-character line wouldn't mean 16 characters in every font so it'd depend on the font. In the font used with "The Interactive Animation", "Nov" would be the widest (31 px). "Jul" would be the shortest (22 px). All the numbers are 10 pixels wide each (including the white space at the end). The colon is 4 and the comma is 5. Whether it's a character-count limit or a pixel-count limit, it's the font that matters.

    Perhaps the shortest nonconflicting format possible would be the "Mar 17, 04 14:30" design with the two-digit year. That's actually 16 characters (using my hypercount ability to count and recheck). It's like anyone is going to be going back to 1904 or the item will continue on to 2104 where the horse-driven wagon is as obsolete today as the product would be even 30 years from now (since its accelerative (or logarithmic)). The seconds are of little importance.
    High elevation is the best elevation. The higher, the better the view!
    My computer: XP Pro SP3, 3.4 GHz i7-2600K CPU (OC'd to 4 GHz), 4 GB DDR3 RAM, X-Fi Platinum sound, GeForce 460, 1920x1440 resolution, 1250 GB HDD space, Visual C++ 2008 Express

  10. #25
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    Not exactly. Two lines, 16 characters each, exactly one fixed-width font (no pixel issues). The timestamp is on one line -- it's "line wrap" is marquee-style rotation of the string after an initial delay.

    [edit]Think something like this.
    Last edited by Dave_Sinkula; 06-06-2007 at 09:20 PM. Reason: Found a picture.
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  11. #26
    Math wizard
    Join Date
    Dec 2006
    Location
    USA
    Posts
    582
    It'd only have a small impact. Afterall, the "Mar 17, 04 14:30" format, which includes a non-conflicting date format, and the hour and minute along with it (in the 24-hour clock format which also prevents the conflict with 12:00 PM being noon or midnight), and it fits perfectly with 16 characters. Normally, I'd use the "Mar 17, 2004 10:30 AM" design which is 21 characters.
    High elevation is the best elevation. The higher, the better the view!
    My computer: XP Pro SP3, 3.4 GHz i7-2600K CPU (OC'd to 4 GHz), 4 GB DDR3 RAM, X-Fi Platinum sound, GeForce 460, 1920x1440 resolution, 1250 GB HDD space, Visual C++ 2008 Express

  12. #27
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    There appears to be an international date format, (basically yyyy-mm-dd hh:mm:ss): http://www.cl.cam.ac.uk/~mgk25/iso-time.html

    This Wikipedia entry is also an interesting read: http://en.wikipedia.org/wiki/Calendar_date
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  13. #28
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    Quote Originally Posted by dwks View Post
    This Wikipedia entry is also an interesting read: http://en.wikipedia.org/wiki/Calendar_date
    Heh. And now I've come full circle!

    It was after doing much research of time/date stuff that since long ago I have been familiar with ISO 8601. And it was this very article showing such a variety of date formats used throughout various places that prompted me to start this thread -- in order to in part get a feel for this.

    What I am taking away at this point is the that I would be correct in assuming that the ability to choose from quite a number of possible configurations would be beneficial. More beneficial than having some cookie cutter "America", "Europe", "Asia" type options.

    ---

    In order to get a better "feel" for the menu system I'm working with and adding to, I've hacked out a simulator.

    Disclaimer for all the pedants:
    This code sucks. It is horrible. It has issues. It has bugs.

    I don't care. It's a tool to help me produce the real thing, which is not very relevant to the simulation code.

    That said, attached is some source that uses Windows console stuff that I've been using to get a feel for things. The only functional portion I'm using is the "Set Date Format" area (shortcut: RIGHT, RIGHT, DOWN, RIGHT). The rest is just placeholder junk to represent being part of the rest of something else. Once there, you can use the UP/DOWN to change the selection, and RIGHT to advance to the next option. When you are finished, LEFT-LEFT-LEFT should take you back to the "Main" screen.

    Given that, for those who ignored my warnings and continued to participate, are you able to choose the format of your choice?
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Advancing day by day until it matches a second date
    By nhubred in forum C++ Programming
    Replies: 1
    Last Post: 05-30-2009, 08:55 AM
  2. Checking array for string
    By Ayreon in forum C Programming
    Replies: 87
    Last Post: 03-09-2009, 03:25 PM
  3. OLE date and time format
    By pastitprogram in forum C++ Programming
    Replies: 7
    Last Post: 04-05-2008, 03:46 PM
  4. validating a date month and year format
    By bazzano in forum C Programming
    Replies: 3
    Last Post: 08-16-2005, 07:45 AM