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 140 def convert_type 141 Date 142 end
db_type()
click to toggle source
# File lib/neo4j/shared/type_converters.rb 144 def db_type 145 Integer 146 end
to_db(value)
click to toggle source
# File lib/neo4j/shared/type_converters.rb 148 def to_db(value) 149 Time.utc(value.year, value.month, value.day).to_i 150 end
to_ruby(value)
click to toggle source
# File lib/neo4j/shared/type_converters.rb 152 def to_ruby(value) 153 value.respond_to?(:to_date) ? value.to_date : Time.at(value).utc.to_date 154 end