Re: Another date exercise

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2009-08-16 at 08:36 +0100, Lester Caine wrote:
> tedd wrote:
> > Hi gang:
> > 
> > Here's another exercise to consider.
> > 
> > This is a date entry problem where the user can enter a date in various 
> > forms, but the return will be in a consistent format.
> > 
> > For example, a user might enter a date in the form of:
> > 
> > August 5, 2009
> > Aug 05 2009
> > Aug 5, 9
> > 08/05/09
> > 8-5-9
> > 8 05 2009
> > 8,5,9
> > 
> > Or any combination thereof.
> > 
> > However, the resultant date will be standardized to: Aug 5, 2009.
> > 
> > Extra points for solving this for Euro as well as US date formats (i.e., 
> > 5 Aug, 2009 vs Aug 5, 2009).  And, extra extra points for accommodating 
> > month brevity, such as "A" for August and "Mar" for March and so on.
> 
> But the real problem here is 05/08/09 is still August 5 2009 .....
> So teaching customers to use 2009.08.05 removes the hassle of needing to know 
> where your target site is based!
> 
> But as has been said, the real solution is a date picker.
> 
> -- 
> Lester Caine - G8HFL
> -----------------------------
> Contact - http://lsces.co.uk/wiki/?page=contact
> L.S.Caine Electronic Services - http://lsces.co.uk
> EnquirySolve - http://enquirysolve.com/
> Model Engineers Digital Workshop - http://medw.co.uk//
> Firebird - http://www.firebirdsql.org/index.php
> 

Seriously, go out and beat your clients over the head, and then hit them
about some more until they understand the folly of using bad date
formats. US-style dates are just the start of it!

Thanks,
Ash
http://www.ashleysheridan.co.uk


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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux