From: Andrew DeFaria Date: Sun, 5 Nov 2017 03:13:07 +0000 (-0700) Subject: Fixed error in date handling. X-Git-Url: https://defaria.com/gitweb/?a=commitdiff_plain;ds=sidebyside;h=fdddbe9be698e933004e960ac1c25057c5f30fbf;hp=411571a10ffb8418fe2d8723dd23784673302b58;p=clearscm.git Fixed error in date handling. --- 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