NAME

Data::Checker::Date - check data to see if it contains a valid date

SYNOPSIS

use Data::Checker;
$obj = new Data::Checker;

$obj->check($data,"Date",$check_opts);

DESCRIPTION

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.

FUNCTIONS

check

This is the only function provided by this module, and it is intended to be used by the Data::Checker module.

CHECKS OPTIONS

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.

EXAMPLES

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.

To check that the values are valid dates
$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' }

KNOWN BUGS AND LIMITATIONS

None known.

SEE ALSO

Dat::Checker, Date::Manip

LICENSE

This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Sullivan Beck (sbeck@cpan.org)