[Catalyst] Changing format of date field

Ian Docherty catalyst at iandocherty.com
Mon Jan 6 15:42:54 GMT 2014

DateTime has an option to change the default stringification with a
'formatter' option.

Also DBIx::Class::InflateColumn::DateTime is a convenience method, you
could choose to use the DBIx::Class::InflateColumn yourself and combine
this with the DateTime formatter option to give you the result you are
looking for.


On 6 January 2014 15:18, Adam Witney <awitney at sgul.ac.uk> wrote:

> Hi,
> I have a date field in a DBIx::Class Result class using
> InflateColumn::DateTime. When I pass this through a Catalyst/TT
> application, the date is presented in YYYY-MM-DD format.
> I can modify this to DD/MM/YYYY in my TT template with object.dmy('/'),
> but I would prefer to change the default DateTime stringification, however
> I am not quite sure where or how to do this?
> Any ideas greatly appreciated.
> Thanks
> Adam
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/
> catalyst at lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20140106/289c3=

More information about the Catalyst mailing list