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

x/hex/src/lib/data/deps.ts>mongo.Timestamp

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

Constructors

new
Timestamp()
new
Timestamp(value: Long | Timestamp)
new
Timestamp(value: { t: number; i: number; })
new
Timestamp(value?: Timestamp | Long | { t: number; i: number; })

Properties

_bsontype: string

Methods

toExtendedJSON(): TimestampExtended
toJSON(): { $timestamp: string; }

Static Properties

readonly
MAX_VALUE

Static Methods

fromBits(lowBits: number, highBits: number): Timestamp

Returns a Timestamp for the given high and low bits. Each is assumed to use 32 bits.

fromExtendedJSON(doc: TimestampExtended): Timestamp
fromInt(value: number): Timestamp

Returns a Timestamp represented by the given (32-bit) integer value.

fromNumber(value: number): Timestamp

Returns a Timestamp representing the given number value, provided that it is a finite number. Otherwise, zero is returned.

fromString(str: string, optRadix: number): Timestamp

Returns a Timestamp from the given string, optionally using the given radix.