Skip to main content
Extremely Popular
Go to Latest
method ObjectId.createFromTime
import { ObjectId } from "https://deno.land/x/mongo@v0.31.2/deps.ts";

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.