John W. Holmes wrote:

Tom wrote:

The end user gets to chose their date format, and so if I cannot reverse their arbitrary date format into a timestamp then I have no chance of ensuring that dates are correct.

This seems like a really fundamentally bad thing about PHP :(


Seems like a fundamental flaw in your program. If the user enteres 01/02/03, what date is that? 2003? January? February? 1st or 2nd?

February. 1st. It's assumed in his environment that the format is dd/mm/yy, just like it's probably assumed in your environment that it's mm/dd/yy (I presume that based on your time zone). If you're developing for an intranet for instance, then you can work with such assumptions.


What I find upsetting in Tom's attitude is his generosity in harsh words: "a really fundamentally bad thing about PHP" would be not being able to cope with this problem at all, but let's be serious, writing a short function (as previously exemplified for free via e-mail by third-parties) is not /such/ a big deal. It may be just me, but I never considered copy/pasting such a nauseating experience.

My 2c,
Bogdan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to