Class: Transit::WriteHandlers::VerboseDateHandler

Inherits:
VerboseTimeHandler show all
Defined in:
lib/transit/write_handlers.rb

Instance Method Summary collapse

Methods inherited from VerboseTimeHandler

#string_rep, #tag

Instance Method Details

#rep(d) ⇒ Object



322
323
324
325
326
327
# File 'lib/transit/write_handlers.rb', line 322

def rep(d)
  # to_datetime because DateTime's strftime is faster
  # thank Time's, and millis are 000 so it doesn't matter
  # if we truncate or round.
  d.to_datetime.strftime(Transit::TIME_FORMAT)
end