On Wed, Apr 2, 2008 at 9:54 AM, Galen Charlton <galen.charlton@liblime.com> wrote:
Hi,
On Wed, Apr 2, 2008 at 5:30 AM, Paul POULAIN <paul.poulain@free.fr> wrote:
It seems that the C4::Dates::format_date function, has a small problem : if the incoming date is 0000-00-00, then the result is : 02/00/0, which is not really a date. I think we should get a '' (nothing) in this case.
I think format_date should return "" or (better) undef in this case. Right now it does print a warning, but as I recall it currently doesn't return undef in order maintain backwards compatibility with code that used C4::Date.
Doing this would require going through a lot of code that uses format_date(), of course. Also, I think we should remove usage of "0000-00-00" to signify a unset date; this should be NULL in database columns and undef in code. I thought we had already removed all use of 0000-00-00, several months ago. Paul, where are you seeing those kinds of non-date data?
Cheers, -- Joshua Ferraro SUPPORT FOR OPEN-SOURCE SOFTWARE CEO migration, training, maintenance, support LibLime Featuring Koha Open-Source ILS jmf@liblime.com |Full Demos at http://liblime.com/koha |1(888)KohaILS