lib/parsedate.rb


DEFINITIONS

This source file includes following functions.


   1  # parsedate.rb: Written by Tadayoshi Funaba 2001, 2002
   2  # $Id: parsedate.rb,v 2.6 2002-05-14 07:43:18+09 tadf Exp $
   3  
   4  require 'date/format'
   5  
   6  module ParseDate
   7  
   8    def parsedate(str, comp=false)
   9      Date._parse(str, comp).
  10        select(:year, :mon, :mday, :hour, :min, :sec, :zone, :wday)
  11    end
  12  
  13    module_function :parsedate
  14  
  15  end