Module: Timerage
- Defined in:
- lib/timerage.rb,
lib/timerage/version.rb,
lib/timerage/time_interval.rb
Defined Under Namespace
Classes: TimeInterval
Constant Summary collapse
- VERSION =
"1.3.0"
Class Method Summary collapse
-
.parse_iso8601(str) ⇒ Object
Returns a Time or Timerage::TimeInterval representation of the iso8601 str.
Class Method Details
.parse_iso8601(str) ⇒ Object
Returns a Time or Timerage::TimeInterval representation of the iso8601 str.
--
Currently this only supports <begin>/<end> style time intervals.
13 14 15 16 17 |
# File 'lib/timerage.rb', line 13 def self.parse_iso8601(str) TimeInterval.iso8601(str) rescue ArgumentError Time.iso8601(str) end |