fixed WikiBugs/NumericDatesNeedZeroPadding

fix contributed by GunnarH
This commit is contained in:
Markus Lude
2016-10-25 19:57:54 +02:00
parent 26037dd0dd
commit 8814048cfc
3 changed files with 7 additions and 4 deletions

View File

@@ -6,6 +6,7 @@ Users which contributed patches added to versions after 1.0:
* CliffordAdams
* DavidClaughton
* DavidWall
* GunnarH
* GyPark
* JuanMtnezPineda
* MikeCastle

View File

@@ -6,6 +6,8 @@ Changes for bugfix release 1.0.5:
* added patch DoPageLockMinorTweak
contributed by JuanMtnezPineda
* Allow "0" as page name if FreeLinks are allowed
* fixed bug NumericDatesNeedZeroPadding
fix contributed by GunnarH
Changes for bugfix release 1.0.4 (December 1, 2007):

View File

@@ -3047,7 +3047,7 @@ sub CalcDay {
$ts += $TimeZoneOffset;
my ($sec, $min, $hour, $mday, $mon, $year) = localtime($ts);
if ($NumberDates) {
return ($year + 1900) . '-' . ($mon+1) . '-' . $mday;
return sprintf("%d-%02d-%02d", $year+1900, $mon+1, $mday);
}
return ("January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November",
@@ -3064,15 +3064,15 @@ sub CalcTime {
if (($TimeZoneOffset == 0) && ($ScriptTZ ne "")) {
$mytz = " " . $ScriptTZ;
}
$ampm = "";
if ($UseAmPm) {
unless ($UseAmPm) {
return sprintf("%02d:%02d$mytz", $hour, $min);
}
$ampm = " am";
if ($hour > 11) {
$ampm = " pm";
$hour = $hour - 12;
}
$hour = 12 if ($hour == 0);
}
$min = "0" . $min if ($min<10);
return $hour . ":" . $min . $ampm . $mytz;
}