lib/health-data-standards/models/entry.rb in health-data-standards-2.1.2 vs lib/health-data-standards/models/entry.rb in health-data-standards-2.1.3
- old
+ new
@@ -29,13 +29,13 @@
attr_protected :version
attr_protected :_id
attr_protected :created_at
attr_protected :updated_at
- def times_to_s
+ def times_to_s(nil_string='UNK')
if start_time.present? || end_time.present?
- start_string = start_time ? Time.at(start_time).utc.to_formatted_s(:long_ordinal) : 'UNK'
- end_string = end_time ? Time.at(end_time).utc.to_formatted_s(:long_ordinal) : 'UNK'
+ start_string = start_time ? Time.at(start_time).utc.to_formatted_s(:long_ordinal) : nil_string
+ end_string = end_time ? Time.at(end_time).utc.to_formatted_s(:long_ordinal) : nil_string
"#{start_string} - #{end_string}"
elsif time.present?
Time.at(time).utc.to_formatted_s(:long_ordinal)
end
end
\ No newline at end of file