Jesse Vincent > Jifty-DBI-0.46 > Jifty::DBI::Filter::DateTime

Download:
Jifty-DBI-0.46.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  0
View Bugs
Report a bug
Source   Latest Release: Jifty-DBI-0.59

NAME ^

Jifty::DBI::Filter::DateTime - DateTime object wrapper around date columns

DESCRIPTION ^

This filter allow you to work with DateTime objects instead of plain text dates. If the column type is "date", then the hour, minute, and second information is discarded when encoding.

Both input and output will always be coerced into UTC (or, in the case of Dates, the Floating timezone) for consistency.

encode

If value is DateTime object then converts it into ISO format YYYY-MM-DD hh:mm:ss. Does nothing if value is not defined.

Sets the value to undef if the value is a string and doesn't match an ISO date (at least).

decode

If value is defined then converts it into DateTime object otherwise do nothing.

SEE ALSO ^

Jifty::DBI::Filter, DateTime