Data::Printer::Filter::DateTime - pretty-printing date and time objects (not just DateTime!)
In your program:
use Data::Printer filters => { -external => [ 'DateTime' ], };
or, in your .dataprinter file:
.dataprinter
{ filters => { -external => [ 'DateTime' ], }, };
You can also setup color and display details:
use Data::Printer filters => { -external => [ 'DateTime' ], }, color => { datetime => 'bright_green', } datetime => { show_class_name => 1, # default is 0 }, };
This is a filter plugin for Data::Printer. It filters through several date and time manipulation classes and displays the time (or time duration) as a string.
DateTime
DateTime::Duration
DateTime::Incomplete
Time::Piece
Date::Handler
Date::Handler::Delta
Date::Calc::Object
Date::Pcalc::Object
If you have any suggestions for more modules or better output, please let us know.
Data::Printer
To install Data::Printer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Printer
CPAN shell
perl -MCPAN -e shell install Data::Printer
For more information on module installation, please visit the detailed CPAN module installation guide.