It depends whether you mean a Date object or a string in date format. If 
you want to validate I tend to use Regexp for that sort of thing.

Here's a Regexp example which covers a variety of date-string formats:

http://www.rubular.com/r/SXfDou7sQs

use like this:

if my_date !~ /\d{1,2}[\-\/]\d{1,2}[\-\/]\d{4}/
  fail TypeError, 'Invalid date: ' + my_date
end


For a Date object it's just:

my_date.is_a?( Date )

-- 
Posted via http://www.ruby-forum.com/.