Method: When::TM::CalDate#_event_form
- Defined in:
- lib/when_exe/inspect.rb
#_event_form(other = nil, options = {}) ⇒ String
Note:
events 配列なし - 日時をそのまま文字列化日時の精度が日より細かい - イベント名(イベント時刻) 日時の精度が日 - イベント名(当日までの経過日数)
event を 文字列化 - 日時で与えられた event を文字列化する
1322 1323 1324 1325 1326 1327 1328 1329 1330 |
# File 'lib/when_exe/inspect.rb', line 1322 def _event_form(other=nil, ={}) return [:method]==:to_m17n ? to_m17n : self unless events return events[0] + '(' + _clk_time_for_inspect([:precision]). to_s([:precision] || precision)[/[:*=0-9]+/] + ')' if precision > When::DAY return events[0] unless other other = JulianDate.dynamical_time(other.dynamical_time, {:time_standard=>time_standard}) unless time_standard.rate_of_clock == other.time_standard.rate_of_clock events[0] + '(' + (other.to_i - to_i).to_s + ')' end |