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

x/web_bson/src/bson.ts>ObjectId.createFromTime

web_bson is a fork from mongodb/js-bson
Very Popular
Go to Latest
method ObjectId.createFromTime
Re-export
import { ObjectId } from "https://deno.land/x/web_bson@v0.2.5/src/bson.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.