Class: DateTime

Inherits:
Object
  • Object
show all
Defined in:
lib/edtf/date_time.rb,
lib/edtf/compatibility.rb

Instance Method Summary collapse

Instance Method Details

#edtfObject Also known as: to_edtf



3
4
5
6
7
8
9
10
# File 'lib/edtf/date_time.rb', line 3

def edtf
  date = super

  time =  strftime('%H:%M:%S')
  time << strftime('%Z') unless skip_timezone?

  [date, time].join('T')
end

#iso8601Object



3
4
5
# File 'lib/edtf/compatibility.rb', line 3

def iso8601
  to_time.iso8601
end

#valuesObject



14
15
16
# File 'lib/edtf/date_time.rb', line 14

def values
  super().concat([hour,minute,second,offset])
end