X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=maps%2Fbin%2FMAPSUtil.pm;h=e28a9d6b086c6814eb066a433a5b6527dfb65a59;hb=066348c5a08e728fd796b8a963d3f5eeb1459a28;hp=2298d77dad0b861c6847054cfcc6c80ae75297ea;hpb=95525f583d9d7df558a17b4cae6fbb841701c1be;p=clearscm.git 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