【发布时间】:2011-10-20 03:15:17
【问题描述】:
这是一个小烦恼,我找不到任何东西。
我在一个 Appointment 对象上有一个集合选择,它显示了可用约会的时间:
f.collection_select :appointment_id, @available, :id, :time, {:prompt => "Select a time"}
这使用标准日期时间格式显示:2011-10-31 08:00:00 UTC 但我真的更喜欢短格式,像这样:
appointment.time.to_s(:short)
显示为 10 月 31 日 08:00
使用符号时,我似乎找不到语法。有人知道吗?
【问题讨论】:
标签: ruby-on-rails select time short