Rocky_Mountain_Vending/.pnpm-store/v10/files/8d/ce91a90866289f55cd0a310cf704b32e24e9c3ca7db93304c1efc2c3cc9e1a38d383e557feeb96aecd79bc5e651fa729464ee12eed2a8328a841e463f988bb
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

31 lines
723 B
Text

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;