Skip to main content
Module

x/mongo/mod.ts>Timestamp

MongoDB driver for Deno
Extremely Popular
Go to Latest
class Timestamp
extends LongWithoutOverridesClass
Re-export
import { Timestamp } from "https://deno.land/x/mongo@v0.31.2/mod.ts";

Constructors

new
Timestamp(int: bigint)
new
Timestamp(long: Long)
new
Timestamp(value: { t: number; i: number; })

Properties

readonly
_bsontype: "Timestamp"

Methods

inspect(): string
toJSON(): { $timestamp: string; }

Static Properties

readonly
MAX_VALUE: Long

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.

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.