BUG 10327 PMDate Functions SOLVED

- No rremplazaba correctamente los valores
- Muestra el nombre del mes correctamente en espaniol cuando sel Sistema se encuentra en espaniol
This commit is contained in:
Julio Cesar Laura
2013-01-15 15:56:43 -04:00
parent f0ac66db42
commit 007c6f26cc

View File

@@ -1372,11 +1372,16 @@ class G
//scape the literal
switch ($lang) {
case 'es':
$format = str_replace( ' del ', '[ofl]', $format );
$format = str_replace( ' de ', '[of]', $format );
break;
}
//first we must formatted the string
$format = str_replace( 'h', '{h}', $format );
$format = str_replace( 'i', '{i}', $format );
$format = str_replace( 's', '{s}', $format );
$format = str_replace( 'yyyy', '{YEAR}', $format );
$format = str_replace( 'yy', '{year}', $format );
@@ -1387,10 +1392,6 @@ class G
$format = str_replace( 'dd', '{DAY}', $format );
$format = str_replace( 'd', '{day}', $format );
$format = str_replace( 'h', '{h}', $format );
$format = str_replace( 'i', '{i}', $format );
$format = str_replace( 's', '{s}', $format );
if ($lang === '') {
$lang = defined( SYS_LANG ) ? SYS_LANG : 'en';
}
@@ -1437,6 +1438,7 @@ class G
//recovering the original literal
switch ($lang) {
case 'es':
$ret = str_replace( '[ofl]', ' del ', $ret );
$ret = str_replace( '[of]', ' de ', $ret );
break;
}