[thelist] MySQL date format

Max Schwanekamp lists at neptunewebworks.com
Mon Nov 28 19:35:27 CST 2005


Hassan Schroeder wrote:
> +------------+------------------------------------------+
> | someday    | result                                   |
> +------------+------------------------------------------+
> | 2005-07-13 | Wednesday, 13 - 14 July 2005             |
> | 2005-10-22 | Saturday, 22 - 23 October 2005           |
> | 2005-11-30 | Wednesday, 30 November - 1 December 2005 |
> | 2005-12-31 | Saturday, 31 December - 1 January 2006   |
> +------------+------------------------------------------+
> Didn't account for the year in that last one, though, but I'd think
> it unnecessary :-)

Maybe it's just my American English, but having the day of only the 
first date looks odd to me.  If you're going to all the trouble of using 
long weekday names and long month names, why not just settle for output 
like "Wednesday 13 July 2005 - Thursday 14 July 2005" ?  If you're using 
a template engine or something similar, you then just have a $startdate 
and $enddate for each row.

-- 
Max Schwanekamp http://www.neptunewebworks.com/



More information about the thelist mailing list