NAME
Kernel::System::DataValidation::Validator::DateTimePeriod – Validator that checks if the date time period value is correct.
PUBLIC INTERFACE
Provides a Check
method, that will be called by the Kernel::System::DataValidation backend.
Check()
Checks if the given value is a valid cron string.
my $True = $Validator->Check(
Value => {
PeriodFormat => 'absolute',
AbsoluteDateTimeStart => '2018-01-01 00:00:00',
AbsoluteDateTimeStop => '2019-12-31 23:59:59',
Scale => {
Unit => 'Day',
Count => 1,
},
},
);
my $False = $Validator->Check(
Value => {
PeriodFormat => 'absolute',
AbsoluteDateTimeStart => 'xyz',
AbsoluteDateTimeStop => 'xyz',
Scale => {
Unit => 'Day',
Count => 1,
},
},
);