# File lib/innodb/data_type.rb, line 277 def value(data) date = BinData::Int24be.read(data) ^ (-1 << 23) day = date & 0x1f month = (date >> 5) & 0xf year = date >> 9 "%04d-%02d-%02d" % [year, month, day] end