added readonly-display for date-time and date-only_time

This commit is contained in:
Ralf Becker 2003-04-27 08:50:20 +00:00
parent 6a1b96229c
commit 99c2ae7f92

View File

@ -101,12 +101,17 @@
{ {
$format += $timeformat; $format += $timeformat;
} }
$sep = $sep[1];
if ($cell['readonly'] || $readonlys) // is readonly if ($cell['readonly'] || $readonlys) // is readonly
{ {
$sep = array(
1 => $sep[1],
2 => $sep[1],
3 => ' ',
4 => ':'
);
for ($str='',$n = $type == 'date-timeonly' ? 3 : 0; $n < count($format); ++$n) for ($str='',$n = $type == 'date-timeonly' ? 3 : 0; $n < count($format); ++$n)
{ {
$str .= ($str != '' ? $sep : ''); $str .= ($str != '' ? $sep[$n] : '');
$str .= $value[$format[$n]]; $str .= $value[$format[$n]];
} }
$value = $str; $value = $str;