Method: Avro::LogicalTypes::IntDate.encode
- Defined in:
- lib/avro/logical_types.rb
.encode(date) ⇒ Object
205 206 207 208 209 |
# File 'lib/avro/logical_types.rb', line 205 def self.encode(date) return date.to_i if date.is_a?(Numeric) (date - EPOCH_START).to_i end |