[Koha-devel] question/problem with date
Galen Charlton
galen.charlton at liblime.com
Wed Apr 2 15:54:00 CEST 2008
Hi,
On Wed, Apr 2, 2008 at 5:30 AM, Paul POULAIN <paul.poulain at 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.
Regards,
Galen
--
Galen Charlton
Koha Application Developer
LibLime
galen.charlton at liblime.com
p: 1-888-564-2457 x709
More information about the Koha-devel
mailing list