class YAHL7::V2::DataType::TS

This is the HL7 data type for a timestamp with a format of YYYY[MM[DD[HH[MM[SS[.S[S[S]]]]]]]][+/-ZZZZ]

Public Instance Methods

timestamp() click to toggle source
# File lib/yahl7/v2/data_type/ts.rb, line 11
def timestamp
  @timestamp ||= parse_timestamp
end

Private Instance Methods

parse_timestamp() click to toggle source
# File lib/yahl7/v2/data_type/ts.rb, line 17
def parse_timestamp
  timestamp = @value.is_a?(Array) ? @value.first : @value
  YAHL7::V2::DateTime.parse(timestamp)
end