summaryrefslogtreecommitdiff
path: root/framework/I18N/core/DateFormat.php
diff options
context:
space:
mode:
authorxue <>2006-04-26 21:18:01 +0000
committerxue <>2006-04-26 21:18:01 +0000
commit8ab196ce6c2d5de323bdd8ebcc11a73814c0cdca (patch)
treee77b1306648d03920439290bb8f3e27821410804 /framework/I18N/core/DateFormat.php
parent5ba6cd4be568f686d890835a77586077cde1a943 (diff)
Merge from 3.0 branch till 971.
Diffstat (limited to 'framework/I18N/core/DateFormat.php')
-rw-r--r--framework/I18N/core/DateFormat.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/framework/I18N/core/DateFormat.php b/framework/I18N/core/DateFormat.php
index 9caca03b..142926f4 100644
--- a/framework/I18N/core/DateFormat.php
+++ b/framework/I18N/core/DateFormat.php
@@ -128,7 +128,12 @@ class DateFormat
if($pattern{0} == "'"
&& $pattern{strlen($pattern)-1} == "'")
{
- $tokens[$i] = preg_replace('/(^\')|(\'$)/','',$pattern);
+ $sub = preg_replace('/(^\')|(\'$)/','',$pattern);
+ $tokens[$i] = str_replace('``````','\'',$sub);
+ }
+ else if($pattern == '``````')
+ {
+ $tokens[$i] = '\'';
}
else
{
@@ -145,7 +150,7 @@ class DateFormat
throw new
Exception('function '.$function.' not found.');
}
- }
+ }
}
return I18N_toEncoding(implode('',$tokens), $charset);
@@ -269,6 +274,7 @@ class DateFormat
$token = null;
$text = false;
+ $pattern = preg_replace("/''/", '``````', $pattern);
for($i = 0; $i < strlen($pattern); $i++)
{
@@ -278,7 +284,7 @@ class DateFormat
}
else
{
- $tokens[] = str_replace("''","'",$token);
+ $tokens[] = str_replace("","'",$token);
$token = $pattern{$i};
}