Re: convert numerical day of week

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

 



On 5/22/07, Robert Cummings <robert@xxxxxxxxxxxxx> wrote:
Yours is the least maintainable.

Hehe..  with 4 times as many lines of code and 160% more bytes of code overall?

cat locale.php|grep -v ^$|wc -l
     16

cat simple.php|grep -v ^$|wc -l
      4


ls -lavh
-rw-r--r--    1 destiney  destiney  347B May 22 17:35 locale.php
-rw-r--r--    1 destiney  destiney  133B May 22 17:35 simple.php


Watch me switch this from English to Spanish:

#$days = array( 'Sunday', 'Monday', 'Tuesday', 'Wednesday',
'Thursday', 'Friday', 'Saturday' );
$days = array( 'Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves',
'Viernes', 'Sábado' );

Tada!  That was the easiest maintenance programming ever.


I have nothing to learn from you that I
didn't learn in kindergarten.

They didn't teach PHP where I attended kindergarten.  Is that a Canadian thing?



--
Greg Donald
http://destiney.com/

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