The Perl Advent Calendar needs more articles for 2022. Submit your idea today!


Data::Tersify::Plugin::DateTime - tersify DateTime objects


 use Data::Tersify;
 print dumper(tersify({ now => DateTime->now }));
 # Prints just today's date and time in yyyy-mm-ss hh:mm:ss format,
 # rather than a full screen of DateTime internals


This class provides terse description for DateTime objects.


It handles DateTime objects only.


It summarises DateTime objects into human-readable representations, using variants of the One True Date format.

If the time is 00:00:00, it returns yyyy-mm-dd; if there's a more interesing time, it returns yyyy-mm-dd hh:mm:ss. If there's also a non-floating timezone, it returns details of that timezone as well, so yyyy-mm-dd hh:mm:ss Time/Zone.