18class XoopsFormDateTime
extends XoopsFormElementTray
21 public function __construct($caption, $name, $size = 15, $value=0)
23 $this->XoopsFormElementTray($caption,
' ');
25 $value = ($value > 0) ? $value : time();
26 $datetime = getDate($value);
29 for ($i = 0; $i < 24; $i++) {
30 for ($j = 0; $j < 60; $j += 10) {
31 $key = ($i * 3600) + ($j * 60);
32 $timearray[$key] = (0 !== $j) ? $i .
':' . $j : $i .
':0' . $j;
36 $timeselect =
new XoopsFormSelect(
'', $name.
'[time]', $datetime[
'hours'] * 3600 + 600 * ceil($datetime[
'minutes'] / 10));
37 $timeselect->addOptionArray($timearray);
40 public function XoopsFormDateTime($caption, $name, $size = 15, $value=0)
42 return $this->
__construct($caption, $name, $size, $value);