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

x/dtils/deps.ts>jwtCore.getNumericDate

The best unofficial library of utilities for Deno applications
Go to Latest
function jwtCore.getNumericDate
import { jwtCore } from "https://deno.land/x/dtils@2.0.0/deps.ts";
const { getNumericDate } = jwtCore;

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