Data::Checker::Date - check data to see if it contains a valid date
use Data::Checker; $obj = new Data::Checker; $obj->check($data,"Date",$check_opts);
This module is meant to be used by the Data::Checker module.
One set of checks that is often done is to see if a piece of data is a valid date.
This module performs several date releated checks.
This is the only function provided by this module, and it is intended to be used by the Data::Checker module.
The $check_opts hashref defines exactly what IP checks to perform, and some options used by those checks. Currently, there are no keys used for date checks.
$check_opts
use Data::Checker; $obj = new Data::Checker; $data = ... $opts = ... ($pass,$fail,$info,$warn) = $obj->check($data,"Date",$opts);
The value of $data and $opts is listed below in the examples.
$data
$opts
$data = [ 'now', '2016-01-01 12:00:00', 'some-string' ]; $opts = { }
This yields:
$pass = [ 'now', '2016-01-01 12:00:00' ]; $fail = { 'some-string' => 'Not a valid date' }
None known.
Dat::Checker, Date::Manip
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Sullivan Beck (sbeck@cpan.org)
To install Data::Checker, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Checker
CPAN shell
perl -MCPAN -e shell install Data::Checker
For more information on module installation, please visit the detailed CPAN module installation guide.