module BSON::Date
def bson_type
Get the BSON type for the date.
def bson_type ::Time::BSON_TYPE end
def to_bson(buffer = ByteBuffer.new)
- Since: - 2.1.0
Other tags:
- See: http://bsonspec.org/#/specification -
Returns:
-
(BSON::ByteBuffer)
- The buffer with the encoded object.
Other tags:
- Example: Get the date as encoded BSON. -
def to_bson(buffer = ByteBuffer.new) buffer.put_int64((jd - DATE_REFERENCE) * MILLISECONDS_IN_DAY) end