0

我正在开发 SE4 中的事件模块,并希望以某种特定格式显示时间/日期。这是我现在使用的代码,用于显示事件开始时间: echo $this->locale()->toTime($event->starttime);这段代码显示的输出11.00没问题,但我的问题是:如何格式化这个输出?

假设我需要输出11:00,有没有办法以这种方式格式化它?

4

1 回答 1

0

尝试这个

$this->locale()->toTime($event->starttime,array('format'=>'h:m'))
于 2012-08-30T08:09:00.193 回答