summaryrefslogtreecommitdiff
path: root/lib/optparse
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-07 13:13:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-07 13:13:44 +0000
commit11cfb7e0f458971deca325c1d3032d1665d74bef (patch)
treec6da9160a08f98a1e33ea0c0dcf56c1998a9ec5b /lib/optparse
parente20d6139f40887a05348357753b55867bf5153ad (diff)
* lib/optparse/time.rb: prior time.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/optparse')
-rw-r--r--lib/optparse/time.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/optparse/time.rb b/lib/optparse/time.rb
index 5e54b709e0..9f677a8d31 100644
--- a/lib/optparse/time.rb
+++ b/lib/optparse/time.rb
@@ -1,9 +1,9 @@
require 'optparse'
-require 'parsedate'
+require 'time'
OptionParser.accept(Time) do |s|
begin
- Time::mktime(*ParseDate::parsedate(s)[0...6])
+ (Time.httpdate(s) rescue Time.parse(s)) if s
rescue
raise OptionParser::InvalidArgument, s
end