Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^2: Compare two datesby Marshall (Canon) |
on Jul 23, 2019 at 06:31 UTC ( [id://11103192]=note: print w/replies, xml ) | Need Help?? |
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 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 Section
Seekers of Perl Wisdom
|
|