27 if(!is_array($a_post))
32 if($a_mode == self::MODE_DATE)
34 return mktime(12, 0, 0,
37 $a_post[
"date"][
"y"]);
47 $a_post[
"date"][
"y"]);
68 switch($ilUser->getDateFormat())
71 $date = explode(
".", $a_post[
"date"]);
72 $dt[
'mday'] = (int)$date[0];
73 $dt[
'mon'] = (int)$date[1];
74 $dt[
'year'] = (int)$date[2];
78 $date = explode(
"-", $a_post[
"date"]);
79 $dt[
'mday'] = (int)$date[2];
80 $dt[
'mon'] = (int)$date[1];
81 $dt[
'year'] = (int)$date[0];
85 $date = explode(
"/", $a_post[
"date"]);
86 $dt[
'mday'] = (int)$date[1];
87 $dt[
'mon'] = (int)$date[0];
88 $dt[
'year'] = (int)$date[2];
92 if($a_mode == self::MODE_DATE)
94 return mktime(12, 0, 0, $dt[
"mon"], $dt[
"mday"], $dt[
"year"]);
105 if(preg_match(
"/([0-9]{1,2})\s*:\s*([0-9]{1,2})\s*".$seconds.
"(am|pm)/", trim(strtolower($a_post[
"time"])), $matches))
107 $dt[
'hours'] = (int)$matches[1];
108 $dt[
'minutes'] = (int)$matches[2];
111 $dt[
'seconds'] = (int)$time[2];
119 if($dt[
'hours'] == 12)
126 else if($ampm ==
"pm")
134 $time = explode(
":", $a_post[
"time"]);
135 $dt[
'hours'] = (int)$time[0];
136 $dt[
'minutes'] = (int)$time[1];
137 $dt[
'seconds'] = (int)$time[2];
141 return mktime($dt[
"hours"], $dt[
"minutes"], $dt[
"seconds"], $dt[
"mon"], $dt[
"mday"], $dt[
"year"]);