Files
NapCatQQ/.pnpm-store/v3/files/3d/30c6605424b547f2ed63e945224d5d966ad81e6937bb6617f7efd1319144f77f30c0adb366c7cf21843d061170f11215aa24a54b32d82bae602acc300465f6
T
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

18 lines
656 B
Plaintext

import { DateInput } from './types';
/**
* Calculates the difference in seconds between two dates.
* 计算两个日期之间的秒差
*
* @param date - The first date to compare.
* @param input - The second date to compare.
* @param asFloat - Whether to return the result as a float.
* @returns The difference in seconds between the two dates.
* @example
* ```ts
* diffInSeconds(new Date(), new Date()); // 0
* diffInSeconds(new Date(), new Date(Date.now() + 1000)); // 1
* diffInSeconds(new Date(), new Date(Date.now() - 1000)); // -1
* ```
*/
export default function diffInSeconds(date: Date, input: DateInput, asFloat?: boolean): number;