Re: Another date exercise

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

 



On Sun, Aug 16, 2009 at 08:36:17AM +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.

I *hate* date pickers. They slow down input. I can type 082309<Enter>
faster than I can ever do it with a date picker. The date class knows
I'm in America and since it's a six-digit date, it must be mmddyy. (Yes,
for those of you *not* in America, I agree our dates are goofy. I think
we all ought to be on the metic system, too, but America and the UK seem
intent on sticking to Imperial measure.)

Paul


-- 
Paul M. Foster

-- 
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