3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-03 01:48:38 +02:00

ParseDate: correct typo in sanitizer

This commit is contained in:
Pragmatic Software 2019-06-07 00:41:19 -07:00
parent 23d20abd59
commit 8f35fa3430

View File

@ -53,7 +53,7 @@ sub parsedate {
# sanitizers
$input =~ s/\b(\d+)\s+(am?|pm?)\b/$1$2/; # remove leading spaces from am/pm
$input =~ s/ (\d+)(am?|pm?)\b/ $1:00:00$2/; # convert 3pm to 3:00:00pm
$input =~ s/ (\d+:\d+)(am?|pm?)\b/ $1:00:00$2/; # convert 3:00pm to 3:00:00pm
$input =~ s/ (\d+:\d+)(am?|pm?)\b/ $1:00$2/; # convert 4:20pm to 4:20:00pm
# split input on "and" or comma, then we'll add up the results
# this allows us to parse things like "1 hour and 30 minutes"