@toreda/time
Version:
Simple, small footprint library for common time operations and converting between units of time.
10 lines (9 loc) • 363 B
TypeScript
/**
* Get the current time as a unix timestamp in integer seconds.
* Does not create a Time object.
*
* @param offset Optional seconds to add or subtract. Non-finite values
* (NaN, Infinity) are ignored. No effect when omitted or null.
* @returns Seconds since Unix Epoch.
*/
export declare function unixTimestampNow(offset?: number | null): number;