Re: Another date exercise

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

 




On Aug 15, 2009, at 3:57 PM, tedd <tedd@xxxxxxxxxxxx> 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.

Gentlemen, start your keyboards.  :-)

As always, should you or any of your IM Force be caught or killed, The Secretary will disavow any knowledge of your actions.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

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


Use a js date picker and avoid the whole issue.

Bastien

Sent from my iPod
--
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