Class: Time

Inherits:
Object
  • Object
show all
Defined in:
motion/core/time.rb

Class Method Summary collapse

Class Method Details

.iso8601(time) ⇒ Object



3
4
5
6
# File 'motion/core/time.rb', line 3

def self.iso8601(time)
  cached_date_formatter("yyyy-MM-dd'T'HH:mm:ss'Z'").
    dateFromString(time)
end

.iso8601_with_fractional_seconds(time) ⇒ Object



13
14
15
16
# File 'motion/core/time.rb', line 13

def self.iso8601_with_fractional_seconds(time)
  cached_date_formatter("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").
    dateFromString(time)
end

.iso8601_with_timezone(time) ⇒ Object



8
9
10
11
# File 'motion/core/time.rb', line 8

def self.iso8601_with_timezone(time)
  cached_date_formatter("yyyy-MM-dd'T'HH:mm:ssZZZZZ").
    dateFromString(time)
end