class M3U8::TimeItem
- M3U8::TimeItem
- Reference
- Object
Overview
TimeItem represents EXT-X-PROGRAM-DATE-TIME
Included Modules
- M3U8::Concern
Extended Modules
- M3U8::Concern
Defined in:
m3u8/time_item.crConstructors
-
.new(params : NamedTuple = NamedTuple.new)
Time.iso8601("2010-02-19T14:54:23.031Z") # => "#EXT-X-PROGRAM-DATE-TIME:2010-02-19T14:54:23.031Z"
-
.new(time = nil)
TimeItem.new("2010-02-19T14:54:23Z") # => #<M3U8::TimeItem:0x10581b920 @time=2010-02-19 14:54:23 UTC> TimeItem.new(Time.iso8601("2010-02-19T14:54:23.031Z")) # => #<M3U8::TimeItem:0x10581b920 @time=2010-02-19 14:54:23 UTC> TimeItem.new # => #<M3U8::TimeItem:0x10581b880 @time=1970-01-01 00:00:00 UTC>
Class Method Summary
Instance Method Summary
-
#empty?
item = TimeItem.new item.empty? # => true item = TimeItem.new("2010-02-19T14:54:23Z") item.empty? # => false
- #time : Time
- #time=(time : Time)
-
#to_s
TimeItem.new("2010-02-19T14:54:23Z").to_s # => "#EXT-X-PROGRAM-DATE-TIME:2010-02-19T14:54:23.031Z" TimeItem.new(Time.iso8601("2010-02-19T14:54:23.031Z")) # => "#EXT-X-PROGRAM-DATE-TIME:2010-02-19T14:54:23.031Z"
Constructor Detail
Time.iso8601("2010-02-19T14:54:23.031Z")
# => "#EXT-X-PROGRAM-DATE-TIME:2010-02-19T14:54:23.031Z"
TimeItem.new("2010-02-19T14:54:23Z")
# => #<M3U8::TimeItem:0x10581b920 @time=2010-02-19 14:54:23 UTC>
TimeItem.new(Time.iso8601("2010-02-19T14:54:23.031Z"))
# => #<M3U8::TimeItem:0x10581b920 @time=2010-02-19 14:54:23 UTC>
TimeItem.new
# => #<M3U8::TimeItem:0x10581b880 @time=1970-01-01 00:00:00 UTC>
Class Method Detail
TimeItem.parse(TimeItem.new("2010-02-19T14:54:23Z"))
TimeItem.parse(Time.iso8601("2010-02-19T14:54:23.031Z"))
TimeItem.parse("2010-02-19T14:54:23.031Z")
TimeItem.parse
Instance Method Detail
item = TimeItem.new
item.empty? # => true
item = TimeItem.new("2010-02-19T14:54:23Z")
item.empty? # => false
TimeItem.new("2010-02-19T14:54:23Z").to_s
# => "#EXT-X-PROGRAM-DATE-TIME:2010-02-19T14:54:23.031Z"
TimeItem.new(Time.iso8601("2010-02-19T14:54:23.031Z"))
# => "#EXT-X-PROGRAM-DATE-TIME:2010-02-19T14:54:23.031Z"