Files
url_tracker_tool/node_modules/date-fns/secondsToHours.mjs
Andrei 58f8093689 Rebrand from 'Redirect Intelligence v2' to 'URL Tracker Tool V2' throughout UI
- Updated all component headers and documentation
- Changed navbar and footer branding
- Updated homepage hero badge
- Modified page title in index.html
- Simplified footer text to 'Built with ❤️'
- Consistent V2 capitalization across all references
2025-08-19 19:12:23 +00:00

32 lines
724 B
JavaScript

import { secondsInHour } from "./constants.mjs";
/**
* @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;