Skip to content
This repository
tree: 609c1988d2
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 14 lines (11 sloc) 0.266 kb
1 2 3 4 5 6 7 8 9 10 11 12 13
require 'active_support/core_ext/object/acts_like'

class DateTime
  # Duck-types as a Date-like class. See Object#acts_like?.
  def acts_like_date?
    true
  end

  # Duck-types as a Time-like class. See Object#acts_like?.
  def acts_like_time?
    true
  end
end
Something went wrong with that request. Please try again.