mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-22 20:09:43 +01:00
Ignore surrounding whitespace for integers in parsedate
This commit is contained in:
parent
277b363310
commit
21cd76e99e
@ -21,7 +21,7 @@ sub parsedate {
|
||||
my $seconds = 0;
|
||||
foreach my $input (@inputs) {
|
||||
return -1 if $input =~ m/forever/i;
|
||||
$input .= ' seconds' if $input =~ m/^\d+$/;
|
||||
$input .= ' seconds' if $input =~ m/^\s*\d+\s*$/;
|
||||
|
||||
my $parse = Time::ParseDate::parsedate($input, NOW => $now);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user