As it's New Year's Day (for Gregorian folks), I got to thinking about MySQL and how it might wish folks Happy New Year. Perhaps someday MySQL will be a bit more like HAL and be capable of doing these things on it's own, for now it takes some work on the command-line client prompt to get a response:
mysql> SELECT DAYOFYEAR(NOW()) as 'Day of Year'; +-------------+ | Day of Year | +-------------+ | 1 | +-------------+ 1 row in set (0.26 sec)
And there you have it, MySQL telling you it's New Year's Day! Not terribly exciting, it's obvious the MySQL doesn't know that day number 1 might be something special to some users. MySQL needs to be a little more concious of culture, perhaps allowing this kind of more direct question:
mysql> SELECT ISNEWYEARSDAY(); +-----------------+ | ISNEWYEARSDAY() | +-----------------+ | 1 | …[Read more]