文件操作 - secondsToHours.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/date-fns/secondsToHours.js
编辑文件内容
import { secondsInHour } from "./constants.js"; /** * @name secondsToHours * @category Conversion Helpers * @summary Convert seconds to hours. * * @description * Convert a number of seconds to a full number of hours. * * @param seconds - The number of seconds to be converted * * @returns The number of seconds converted in hours * * @example * // Convert 7200 seconds into hours * const result = secondsToHours(7200) * //=> 2 * * @example * // It uses floor rounding: * const result = secondsToHours(7199) * //=> 1 */ export function secondsToHours(seconds) { const hours = seconds / secondsInHour; return Math.trunc(hours); } // Fallback for modularized imports: export default secondsToHours;
修改文件时间
将文件时间修改为当前时间的前一年
删除文件