Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/hex/src/fw/service/deps.ts>djwt.getNumericDate

An ecosystem delivering practices, philosophy and portability. Powered By Deno and JavaScript.
Latest
function djwt.getNumericDate
import { djwt } from "https://deno.land/x/hex@0.6.5/src/fw/service/deps.ts";
const { getNumericDate } = djwt;

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