summaryrefslogtreecommitdiff
path: root/lib/time.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/time.rb')
-rw-r--r--lib/time.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/time.rb b/lib/time.rb
index c572e76d7d..b565130b50 100644
--- a/lib/time.rb
+++ b/lib/time.rb
@@ -26,7 +26,7 @@ require 'date'
class Time
- VERSION = "0.2.2"
+ VERSION = "0.3.0"
class << Time
@@ -391,6 +391,8 @@ class Time
# heuristic to detect the format of the input string, you provide
# a second argument that describes the format of the string.
#
+ # Raises `ArgumentError` if the date or format is invalid.
+ #
# If a block is given, the year described in +date+ is converted by the
# block. For example:
#
@@ -455,7 +457,7 @@ class Time
#
def strptime(date, format, now=self.now)
d = Date._strptime(date, format)
- raise ArgumentError, "invalid date or strptime format - `#{date}' `#{format}'" unless d
+ raise ArgumentError, "invalid date or strptime format - '#{date}' '#{format}'" unless d
if seconds = d[:seconds]
if sec_fraction = d[:sec_fraction]
usec = sec_fraction * 1000000