mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
a0a9227b71
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
15 lines
325 B
Ruby
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
|