3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-26 22:09:26 +01:00

ParseDate: clarified a couple of comments

This commit is contained in:
Pragmatic Software 2019-06-06 21:52:39 -07:00
parent dd4dcf2e0a
commit 61004dd077

View File

@ -41,11 +41,12 @@ sub parsedate {
# sanitizers
$input =~ s/\s+(am?|pm?)/$1/; # remove leading spaces from am/pm
# split input on "and" or comma, then we'll add up the seconds
# 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"
my @inputs = split /(?:,?\s+and\s+|\s*,\s*)/, $input;
# adjust timezone to user-override if user provides a timezone
# we don't know if a timezone was provided until it is parsed
# we won't know if a timezone was provided until it is parsed
my $timezone;
my $tz_override = 'UTC';