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

std/ulid/mod.ts>decodeTime

The Deno Standard Library
Latest
The Standard Library has been moved to JSR. See the blog post for details.
function decodeTime
import { decodeTime } from "https://deno.land/std@0.224.0/ulid/mod.ts";

Extracts the timestamp given a ULID.

Examples

Example 1

import { ulid, decodeTime } from "https://deno.land/std@0.224.0/ulid/mod.ts";

const x = ulid(150000);
decodeTime(x); // 150000

Parameters

id: string

Returns

number