[Catalyst] Changing format of date field

Adam Witney awitney at sgul.ac.uk
Tue Jan 7 09:32:22 GMT 2014


Thanks for your reply Ian,

So you mean copy DBIx::Class::InflateColumn::DateTime under my lib/ 
directory and build into the DateTime formatter option?

On 6. 1. 2014 15:42, Ian Docherty wrote:
> 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.
>
> icydee
>
>
> On 6 January 2014 15:18, Adam Witney <awitney at sgul.ac.uk
> <mailto: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 <mailto:Catalyst at lists.scsys.co.uk>
>     Listinfo:
>     http://lists.scsys.co.uk/cgi-__bin/mailman/listinfo/catalyst
>     <http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst>
>     Searchable archive:
>     http://www.mail-archive.com/__catalyst@lists.scsys.co.uk/
>     <http://www.mail-archive.com/catalyst@lists.scsys.co.uk/>
>     Dev site: http://dev.catalyst.perl.org/
>
>
>
>
> _______________________________________________
> 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@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>



More information about the Catalyst mailing list