Files
SnowLuma/.pnpm-store/v11/files/8a/0cbf1e0cc9a79540c8da2a2abc6a3e32de431be1565d0816e46dae99dc2a7469e2687414b85306fa01404a690fa295f9e761eec076da7e5435e2dfaa4181ee
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

17 lines
689 B
Plaintext

/**
* Adds a specified number of seconds to a date.
* 向日期添加指定数量的秒。
*
* @param date - The date to add seconds to. (要添加秒的日期。)
* @param seconds - The number of seconds to add. (要添加的秒数。)
* @returns A new date with the added seconds. (添加秒后的新日期。)
* @example
* ```ts
* // Adding 30 seconds to a date (向日期添加30秒)
* const originalDate = new Date('2023-10-01T12:00:00');
* addSeconds(originalDate, 30);
* console.log(originalDate.toISOString()); // Outputs: '2023-10-01T12:00:30.000Z' (输出: '2023-10-01T12:00:30.000Z')
* ```
*/
export default function addSeconds(date: Date, seconds: number): Date;