Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

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

An ecosystem delivering practices, philosophy and portability. Powered By Deno and JavaScript.
Latest
method mongo.ObjectId.createFromTime
Re-export
import { mongo } from "https://deno.land/x/hex@0.6.5/src/lib/data/deps.ts";
const { ObjectId } = mongo;

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.