
class Time

  # Convert a Time to a Date. Time is a superset of Date.
  # It is the year, month and day that are carried over.
  def to_date
    require 'date'
    ::Date.new(year, month, day)
  end

end


#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
=begin test

  require 'test/unit'
  require 'time'

  class TCTime < Test::Unit::TestCase

    def setup
      @t = Time.parse('4/20/2005 15:37')
    end

    def test_to_date
      assert_instance_of( ::Date, @t.to_date )
    end

  end

=end
