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
eban b65e3629da * sample/test.rb: substitute 'select' with 'values_at'.
* lib/date.rb: ditto.
* lib/parsedate.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-05 10:05:11 +00:00

15 lines
328 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).
values_at(:year, :mon, :mday, :hour, :min, :sec, :zone, :wday)
end
module_function :parsedate
end