Yes, in the USA: MM/DD/YYYY is also common. However just like DD.MM.YYYY, there may not be leading zero'es for the days or months.

I prefer one of the 12 formats shown in my previous post so that an ASCII sort order will work. Converting a date to a numeric value for comparisons will work and I don't have any big quibble with that. But I would run a regex to convert: DD.MM.YYYY to YYYY-MM-DD for storage and processing purposes. Wenn der Benutzer ein Deutscher ist, würde ich die Ziffernreihenfolge für Anzeigezwecke ändern. Or maybe not? My German is not that great!

Update:
I use YYYY-MM-DD as expressed in GMT/UTC time zone for all of my logging. If some conversion to local time formats for a user display is necessary, I do that. However almost all of my work is in GMT/UTC. Yes there is a small technical difference between these two definitions of time. For my work, this difference just doesn't matter. Some DB's use a numeric value for the date and some use a string. Any DB that uses a numeric value for a date, has a function to generate that numeric value from YYYY-MM-DD.

I use the terms GMT and UTC interchangeably. See Coordinated Universal Time. This wiki article notwithstanding, I recollect that there is some extremely small difference having to do with small fractions of seconds related to this "leap second" stuff. Nobody here has to worry about UTC vs GMT => for all practical purposes, they are the same.


In reply to Re^2: Compare two dates by Marshall
in thread Compare two dates by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.