Class: Time
Instance Method Summary collapse
-
#to_ib ⇒ Object
Render datetime in IB format (zero padded “yyyymmdd HH:mm:ss”).
Instance Method Details
#to_ib ⇒ Object
Render datetime in IB format (zero padded “yyyymmdd HH:mm:ss”)
27 28 29 30 |
# File 'lib/extensions/class-extensions.rb', line 27 def to_ib "#{year}#{sprintf("%02d", month)}#{sprintf("%02d", day)} " + "#{sprintf("%02d", hour)}:#{sprintf("%02d", min)}:#{sprintf("%02d", sec)}" end |