UNPKG

@burglekitt/gmt

Version:

Temporal-based date and time utilities with timezone support and polyfill integration

19 lines (18 loc) 700 B
import type { UnixUnit } from "../validate/index.js"; /** * Return the minute (0-59) from a unix epoch value. * * - Delegates to {@link parseUnitFromUnix} with unit "minute". * - Returns "" for invalid input. * * @param value unix epoch in milliseconds or seconds (number or string) * @param options optional: epochUnit ("seconds" | "milliseconds"), timeZone (IANA) * @returns Minute (00-59) or "" on invalid input * * @example parseMinuteFromUnix(1700000000000) // "26" * @example parseMinuteFromUnix(-86400, { epochUnit: "seconds" }) // "00" */ export declare function parseMinuteFromUnix(value: number | string, options?: { epochUnit?: UnixUnit; timeZone?: string; }): string;