DateConverter¶
Converts Date objects to Java long types. Must be timezone UTC.
Constants¶
Methods¶
def convert_type Date end
def converted?(value) value.is_a?(db_type) end
def db_type Integer end
def to_db(value) Time.utc(value.year, value.month, value.day).to_i end
def to_ruby(value) value.respond_to?(:to_date) ? value.to_date : Time.at(value).utc.to_date end