BsonObjectID.createDateID

Creates a pseudo object ID that matches the given date.

This kind of ID can be useful to query a database for items in a certain date interval using their ID. This works using the property of standard BSON object IDs that they store their creation date as part of the ID. Note that this date part is only 32-bit wide and is limited to the same timespan as a 32-bit Unix timestamp.

struct BsonObjectID
@safe static
createDateID
(
in SysTime time
)

Meta