Ulid timestamp extract
ulid-timestamp-extract · version 1.0.0 · Identifiers & check digits · free, no key needed
Extract the exact unsigned 48-bit millisecond timestamp from a canonical uppercase ULID.
Use when you need to: extract ULID timestamp · read milliseconds from ULID · decode ULID time field.
Decide before calling
Read the versioned contract and the supported scope below. Reuse ulid-timestamp-extract@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use ulid-timestamp-extract@1.0.0 for extract ULID timestamp. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- extract ULID timestamp
- read milliseconds from ULID
- decode ULID time field
- get ULID timestamp integer
- inspect canonical ULID time
- convert ULID prefix to milliseconds
Not supported
- convert timestamp to a date
- accept noncanonical ULIDs
Behavior
- Canonical ULID text is exactly 26 uppercase ASCII Crockford Base32 characters; I, L, O, U, lowercase, whitespace, and first characters 8 through Z are rejected.
- The 48-bit timestamp is represented as a canonical unsigned decimal string, avoiding JSON number precision loss.
- Inputs are never trimmed or normalized; operations are synchronous, pure, offline, bounded, and deterministic.
Input
ulid(string, required): min length 26; max length 26; pattern^[0-7][0-9A-HJKMNP-TV-Z]{25}$
Output
timestamp_ms(string, required): max length 15; pattern^(0|[1-9][0-9]*)$
Limits
- max ulid bytes: 26
Example
Request input:
{
"ulid": "00000000000000000000000000"
}
Response:
{
"result": {
"timestamp_ms": "0"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "ulid-timestamp-extract",
"version": "1.0.0",
"input": {
"ulid": "00000000000000000000000000"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/ulid-timestamp-extract/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"ulid":"00000000000000000000000000"}'
The machine-readable contract is at /v1/tools/ulid-timestamp-extract/versions/1.0.0.
CLI
node cli.mjs run ulid-timestamp-extract 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Ulid parse canonical: Parse a canonical uppercase ULID into its exact timestamp, randomness, and 16 bytes.
- Doi parse: Parse a DOI (bare, doi: or doi.org URL) into prefix, suffix, directory indicator, registrant code and canonical forms.
- Ulid format: Format an explicit 48-bit timestamp and ten random bytes as one canonical uppercase ULID.
- Cn resident id parse: Parse an 18-digit (or legacy 15-digit) Chinese resident ID: region code, birth date, sex and GB 11643-1999 check digit.
- Iban compute from bban: Compute the MOD 97-10 check digits and full IBAN for a country code and BBAN, using the pinned IBAN registry.
- Isin compute from nsin: Build a 12-character ISIN from a country prefix and a CUSIP/SEDOL national number, computing its Luhn check digit.