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

x/deno_nest/modules/jwt/deps.ts>getNumericDate

Refer to nestjs to realize some common functions for Deno, support hono and oak
Latest
function getNumericDate
import { getNumericDate } from "https://deno.land/x/deno_nest@v3.15.1/modules/jwt/deps.ts";

This helper function simplifies setting a NumericDate. It takes either a Date object or a number (in seconds) and returns the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time.

Parameters

exp: number | Date

Returns

number