Module: TimePup

Defined in:
lib/time_pup.rb,
lib/time_pup/version.rb,
lib/time_pup/time_parser.rb,
lib/time_pup/adverb_parser.rb,
lib/time_pup/date_time_parser.rb,
lib/time_pup/incremental_time.rb

Defined Under Namespace

Classes: AdverbParser, DateTimeParser, IncrementalTime, TimeParser

Constant Summary collapse

VERSION =
"0.0.1"

Class Method Summary collapse

Class Method Details

.parse(time, timezone = 'UTC') ⇒ Object



18
19
20
21
22
23
# File 'lib/time_pup.rb', line 18

def self.parse(time, timezone = 'UTC')
  TimePup::AdverbParser.parse(time, timezone) ||
    TimePup::DateTimeParser.parse(time, timezone) ||
    TimePup::IncrementalTime.parse(time) ||
    TimePup::TimeParser.parse(time, timezone)
end