📝 Commit Details:
This commit is contained in:
30
backend/node_modules/date-fns/secondsToHours.cjs
generated
vendored
Normal file
30
backend/node_modules/date-fns/secondsToHours.cjs
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
exports.secondsToHours = secondsToHours;
|
||||
var _index = require("./constants.cjs");
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
function secondsToHours(seconds) {
|
||||
const hours = seconds / _index.secondsInHour;
|
||||
return Math.trunc(hours);
|
||||
}
|
Reference in New Issue
Block a user