Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/hex/src/data/deps.ts>mongo.Bson.ObjectId.createFromTime

An ecosystem delivering practices, philosophy and portability.
Go to Latest
method mongo.Bson.ObjectId.createFromTime
Re-export
import { mongo } from "https://deno.land/x/hex@0.5.15/src/data/deps.ts";
const { ObjectId } = mongo.Bson;

Creates an ObjectId from a second based number, with the rest of the ObjectId zeroed out. Used for comparisons or sorting the ObjectId.

Parameters

time: number
  • an integer number representing a number of seconds.