class Date

Adding the to_hl7 method to the ruby Date class.

Public Instance Methods

to_hl7() click to toggle source

Get a HL7 timestamp (type TS) for a Date instance.

Date.parse('2009-12-02').to_hl7
=> "20091202"
# File lib/core_ext/date_time.rb, line 38
def to_hl7
  strftime('%Y%m%d')
end