fizx-uberchronic 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/lib/uberchronic.rb +5 -3
  2. data/uberchronic.gemspec +1 -1
  3. metadata +1 -1
@@ -4,12 +4,14 @@ require File.dirname(__FILE__) + "/../ext/get_date"
4
4
  require "time"
5
5
 
6
6
  module Uberchronic
7
- def self.parse(str)
8
- if stamp = GetDate.parse(str)
7
+ def self.parse(str, *args)
8
+ if time = Chronic.parse(str, *args)
9
+ return time
10
+ elsif stamp = GetDate.parse(str)
9
11
  puts stamp.inspect
10
12
  return Time.at(stamp)
11
13
  else
12
- return Chronic.parse(str)
14
+ return nil
13
15
  end
14
16
  end
15
17
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "uberchronic"
3
- s.version = "0.1.0"
3
+ s.version = "0.2.0"
4
4
  s.date = "2009-04-14"
5
5
  s.summary = "Like chronic, plus GNU getdate to cover edge cases"
6
6
  s.email = "kyle@kylemaxwell.com"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fizx-uberchronic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Maxwell