1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/lib/parsedate.rb
tadf a0a9227b71 use Array#select instead of Array#indexes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-18 12:57:54 +00:00

15 lines
325 B
Ruby

# parsedate.rb: Written by Tadayoshi Funaba 2001, 2002
# $Id: parsedate.rb,v 2.6 2002-05-14 07:43:18+09 tadf Exp $
require 'date/format'
module ParseDate
def parsedate(str, comp=false)
Date._parse(str, comp).
select(:year, :mon, :mday, :hour, :min, :sec, :zone, :wday)
end
module_function :parsedate
end