@burglekitt/gmt
Version:
Temporal-based date and time utilities with timezone support and polyfill integration
20 lines (19 loc) • 744 B
TypeScript
import type { UnixUnit } from "../validate/isValidUnixUnit.js";
/**
* Return whether `value1` represents an instant strictly after `value2`.
*
* - Uses Temporal.Instant.compare to check ordering.
* - Returns false if either input is invalid.
*
* @param value1 first unix epoch value
* @param value2 second unix epoch value
* @param options optional: epochUnit ("seconds" | "milliseconds")
* @returns `true` if `value1` is after `value2`, otherwise `false`
*
* @example isAfterUnix(1706659200, 1704067200) // true
* @example isAfterUnix(1706659200, 1706659200) // false
* @example isAfterUnix(-1, 0) // false
*/
export declare function isAfterUnix(value1: number, value2: number, options?: {
epochUnit?: UnixUnit;
}): boolean;