def to_bson(buffer = ByteBuffer.new, validating_keys = Config.validating_keys?)
      buffer.put_int64((jd - DATE_REFERENCE) * MILLISECONDS_IN_DAY)
    end
def to_bson(buffer = ByteBuffer.new, validating_keys = Config.validating_keys?)
      buffer.put_int64((jd - DATE_REFERENCE) * MILLISECONDS_IN_DAY)
    end
Get the date as encoded BSON.

 @example Get the date as encoded BSON.
   Date.new(2012, 1, 1).to_bson

 @return [ BSON::ByteBuffer ] The buffer with the encoded object.

 @see http://bsonspec.org/#/specification

 @since 2.1.0