class Neo4j::Shared::TypeConverters::DateConverter

Converts Date objects to Java long types. Must be timezone UTC.

Public Class Methods

convert_type() click to toggle source
    # File lib/neo4j/shared/type_converters.rb
143 def convert_type
144   Date
145 end
db_type() click to toggle source
    # File lib/neo4j/shared/type_converters.rb
147 def db_type
148   Integer
149 end
to_db(value) click to toggle source
    # File lib/neo4j/shared/type_converters.rb
151 def to_db(value)
152   Time.utc(value.year, value.month, value.day).to_i
153 end
to_ruby(value) click to toggle source
    # File lib/neo4j/shared/type_converters.rb
155 def to_ruby(value)
156   value.respond_to?(:to_date) ? value.to_date : Time.at(value).utc.to_date
157 end