[Koha-devel] question/problem with date
Joshua Ferraro
jmf at liblime.com
Wed Apr 2 17:20:21 CEST 2008
On Wed, Apr 2, 2008 at 9:54 AM, Galen Charlton
<galen.charlton at liblime.com> wrote:
> 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.
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 at liblime.com |Full Demos at http://liblime.com/koha |1(888)KohaILS
More information about the Koha-devel
mailing list