From: Smylers Date: 14:43 on 02 Nov 2007 Subject: MySQL date_format() MySQL's strftime()-esque function is called date_format(). That's mildly hateful, because it involves going to the manual page to look up whether it's date_format() or format_date() or format_datetime() or dateformat() or ... But at least it's understandable; the name is much more intuitive to those whose backgrounds don't include strftime(). Much more hateful is that even after getting the right name for the function, it still does the wrong thing because it takes the date first and the format second. Why? Why, when it's at best arbitrary which way round two arguments go, but there's a history of putting the format string first, would you do it t'other way round? I'm hoping that merely typing out this hate will sufficiently ingrain it in my memory that I'll remember it and not be caught out by it again ... Smylers
From: numien Date: 15:27 on 02 Nov 2007 Subject: Re: MySQL date_format() I guess because "date_format()" is date, then format? Would sure be nice if it were smart enough to accept it either way though. How hard can it really be to tell a format string from a date/datetime? Even if it happens to be a string instead of an SQL date (or similar) field, not rocket science to tell them apart here. For that matter, how hard would it be for them to alias format_date() and a couple of others too?
From: Jonathan Stowe Date: 15:40 on 02 Nov 2007 Subject: Re: MySQL date_format() On Fri, 2007-11-02 at 14:43 +0000, Smylers wrote: > MySQL's strftime()-esque function is called date_format(). > > That's mildly hateful, because it involves going to the manual page to > look up whether it's date_format() or format_date() or format_datetime() > or dateformat() or ... But at least it's understandable; the name is > much more intuitive to those whose backgrounds don't include strftime(). > > Much more hateful is that even after getting the right name for the > function, it still does the wrong thing because it takes the date first > and the format second. Why? Why, when it's at best arbitrary which way > round two arguments go, but there's a history of putting the format > string first, would you do it t'other way round? > > I'm hoping that merely typing out this hate will sufficiently ingrain it > in my memory that I'll remember it and not be caught out by it again ... Well even more annoying is that you will be told by some MySQL fanboy that it is fixed in the very next version than the one you have installed. /J\
From: Jarkko Hietaniemi Date: 15:48 on 02 Nov 2007 Subject: Re: MySQL date_format() > > > > I'm hoping that merely typing out this hate will sufficiently ingrain it > > in my memory that I'll remember it and not be caught out by it again ... > > Well even more annoying is that you will be told by some MySQL fanboy > that it is fixed in the very next version than the one you have > installed. Or that it cannot be done because of performance reasons. > /J\ > >
From: sabrina downard Date: 15:49 on 02 Nov 2007 Subject: Re: MySQL date_format() > > I'm hoping that merely typing out this hate will sufficiently ingrain it > > in my memory that I'll remember it and not be caught out by it again ... > Well even more annoying is that you will be told by some MySQL fanboy > that it is fixed in the very next version than the one you have > installed. ...but only for the platform that he's running; for yours, you have to wait for the next release.
From: Peter da Silva Date: 16:36 on 02 Nov 2007 Subject: Re: MySQL date_format() date comes first because it's "date_format" and not "format_date". :) (I have no idea whether this is true or not)
From: Michael G Schwern Date: 20:12 on 09 Nov 2007 Subject: Re: MySQL date_format() Peter da Silva wrote: > date comes first because it's "date_format" and not "format_date". :) > > (I have no idea whether this is true or not) Like Yoda speak the MySQL developers to wise seem they.
Generated at 10:27 on 16 Apr 2008 by mariachi