about summary refs log tree commit homepage
path: root/lib
diff options
authorEric Wong <e@80x24.org>2015-07-13 20:52:46 +0000
committerEric Wong <e@80x24.org>2015-07-18 08:20:26 +0000
commit2f3c9d105ab13c730c497da7d8c63f6ed11cf91f (patch)
tree7edd52c8dcdb861c22b4fbfcaa1d4866b30b428e /lib
parenta1fe61ba7ce028b2b904b8ee90bcfb47c73bc6c6 (diff)
This makes it easier to use in a user-friendly scripting interface
we have coming up.
Diffstat (limited to 'lib')
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/dtas/parse_time.rb b/lib/dtas/parse_time.rb
index 7dd41c6..473f412 100644
--- a/lib/dtas/parse_time.rb
+++ b/lib/dtas/parse_time.rb
@@ -3,9 +3,11 @@
 require_relative '../dtas'
 module DTAS::ParseTime
-  # convert a string time to seconds, returning a Flot or Integer
+  # convert a string time to seconds, returning a Floot or Integer
   def parse_time(time)
     case time
+    when Numeric
+      time
     when /\A\d+\z/
     when /\A[\d\.]+\z/