From fdddbe9be698e933004e960ac1c25057c5f30fbf Mon Sep 17 00:00:00 2001 From: Andrew DeFaria Date: Sat, 4 Nov 2017 20:13:07 -0700 Subject: [PATCH] Fixed error in date handling. --- maps/bin/MAPSUtil.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/maps/bin/MAPSUtil.pm b/maps/bin/MAPSUtil.pm index 2298d77..e28a9d6 100644 --- a/maps/bin/MAPSUtil.pm +++ b/maps/bin/MAPSUtil.pm @@ -33,9 +33,9 @@ sub Today2SQLDatetime; sub FormatDate { my ($date) = @_; - return substr $date, 5, 2 . '/' . - substr $date, 8, 2 . '/' . - substr $date, 0, 4; + return substr ($date, 5, 2) . '/' . + substr ($date, 8, 2) . '/' . + substr ($date, 0, 4); } # FormatDate sub FormatTime { @@ -141,9 +141,9 @@ sub SubtractDays { $month = '0' . $month; } # if - # Prefix days with 0 if necessary - if ($days eq 0) { - $days = '01'; + # Prefix days with 0 if necessary + if ($days == 0) { + $days = '01'; } elsif ($days < 10) { $days = '0' . $days; } # if -- 2.17.1