From 61004dd077bd4406c5d23b10f5cdec02457c29ff Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Thu, 6 Jun 2019 21:52:39 -0700 Subject: [PATCH] ParseDate: clarified a couple of comments --- PBot/Utils/ParseDate.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PBot/Utils/ParseDate.pm b/PBot/Utils/ParseDate.pm index 51e00d18..9be6cb52 100644 --- a/PBot/Utils/ParseDate.pm +++ b/PBot/Utils/ParseDate.pm @@ -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';