Index: openacs-4/packages/acs-lang/acs-lang.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/acs-lang.info,v diff -u -r1.62.2.9 -r1.62.2.10 --- openacs-4/packages/acs-lang/acs-lang.info 13 Feb 2017 14:00:02 -0000 1.62.2.9 +++ openacs-4/packages/acs-lang/acs-lang.info 13 Feb 2017 14:12:00 -0000 1.62.2.10 @@ -22,7 +22,7 @@ - + Index: openacs-4/packages/acs-lang/tcl/localization-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/localization-procs.tcl,v diff -u -r1.24.2.4 -r1.24.2.5 --- openacs-4/packages/acs-lang/tcl/localization-procs.tcl 13 Feb 2017 13:57:26 -0000 1.24.2.4 +++ openacs-4/packages/acs-lang/tcl/localization-procs.tcl 13 Feb 2017 14:12:00 -0000 1.24.2.5 @@ -83,13 +83,13 @@ error "Not a number $num" } else { - regsub -all "$thou" $number "" number + regsub -all $thou $number "" number if {!$integer_only_p} { - regsub -all "$dec" $number "." number + regsub -all $dec $number "." number } - set number [lc_trim_leading_zeros $number] + set number [util::trim_leading_zeros $number] # Last pathological case if {"." eq $number } { @@ -323,7 +323,7 @@ error "Invalid date: $datetime" } } - set lc_time_year [lc_trim_leading_zeros $lc_time_year] + set lc_time_year [util::trim_leading_zeros $lc_time_year] set a [expr {(14 - $lc_time_month) / 12}] set y [expr {$lc_time_year - $a}] @@ -335,27 +335,6 @@ return [subst [util_memoize [list lc_time_fmt_compile $fmt $locale]]] } -ad_proc -private lc_trim_leading_zeros { - string -} { - Returns a string w/ leading zeros trimmed. - Used to get around Tcl interpreter problems w/ thinking leading - zeros are octal. - - If string is real and mod(number)<1, then we have pulled off - the leading zero; i.e. 0.231 -> .231 -- this is still fine - for Tcl though... -} { - set string [string trimleft $string 0] - - if {$string eq ""} { - return 0 - } - - return $string -} - - ad_proc -public lc_time_fmt_compile { fmt locale