mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-26 12:51:52 +02:00
"fixed previous commit: day&month are displayed again with leading 0 plus some other fixes"
This commit is contained in:
parent
6ffdbb01a1
commit
41f10cd5cc
@ -140,7 +140,6 @@
|
|||||||
$value = array(
|
$value = array(
|
||||||
'Y' => (int) adodb_date('Y',$value),
|
'Y' => (int) adodb_date('Y',$value),
|
||||||
'm' => (int) adodb_date('m',$value),
|
'm' => (int) adodb_date('m',$value),
|
||||||
'M' => substr(lang(adodb_date('F',$value)),0,3),
|
|
||||||
'd' => (int) adodb_date('d',$value),
|
'd' => (int) adodb_date('d',$value),
|
||||||
'H' => (int) adodb_date('H',$value),
|
'H' => (int) adodb_date('H',$value),
|
||||||
'i' => (int) adodb_date('i',$value)
|
'i' => (int) adodb_date('i',$value)
|
||||||
@ -162,6 +161,10 @@
|
|||||||
{
|
{
|
||||||
$format += $timeformat;
|
$format += $timeformat;
|
||||||
}
|
}
|
||||||
|
if ($value['m'] && strchr($this->dateformat,'M') !== false)
|
||||||
|
{
|
||||||
|
$value['M'] = substr(lang(adodb_date('F',$value['m'])),0,3);
|
||||||
|
}
|
||||||
if ($readonly) // is readonly
|
if ($readonly) // is readonly
|
||||||
{
|
{
|
||||||
if ($value['H'] === '') unset($value['a']); // no am/pm if no hour set
|
if ($value['H'] === '') unset($value['a']); // no am/pm if no hour set
|
||||||
@ -180,7 +183,8 @@
|
|||||||
{
|
{
|
||||||
$str = lang(adodb_date('l',adodb_mktime(12,0,0,$value['m'],$value['d'],$value['Y']))).' ';
|
$str = lang(adodb_date('l',adodb_mktime(12,0,0,$value['m'],$value['d'],$value['Y']))).' ';
|
||||||
}
|
}
|
||||||
$str .= ($str != '' ? $sep[$n] : '') . $value[$format[$n]];
|
$str .= ($str != '' ? $sep[$n] : '') .
|
||||||
|
(is_numeric($value[$format[$n]]) ? sprintf('%02d',$value[$format[$n]]) : $value[$format[$n]]);
|
||||||
}
|
}
|
||||||
if ($type == 'date-houronly') ++$n; // no minutes
|
if ($type == 'date-houronly') ++$n; // no minutes
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user