registration
This commit is contained in:
13
frontend/style/node_modules/date-fns/hoursToMilliseconds.js
generated
vendored
13
frontend/style/node_modules/date-fns/hoursToMilliseconds.js
generated
vendored
@@ -1,6 +1,4 @@
|
||||
"use strict";
|
||||
exports.hoursToMilliseconds = hoursToMilliseconds;
|
||||
var _index = require("./constants.js");
|
||||
import { millisecondsInHour } from "./constants.js";
|
||||
|
||||
/**
|
||||
* @name hoursToMilliseconds
|
||||
@@ -10,8 +8,6 @@ var _index = require("./constants.js");
|
||||
* @description
|
||||
* Convert a number of hours to a full number of milliseconds.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param hours - number of hours to be converted
|
||||
*
|
||||
* @returns The number of hours converted to milliseconds
|
||||
@@ -21,6 +17,9 @@ var _index = require("./constants.js");
|
||||
* const result = hoursToMilliseconds(2)
|
||||
* //=> 7200000
|
||||
*/
|
||||
function hoursToMilliseconds(hours) {
|
||||
return Math.trunc(hours * _index.millisecondsInHour);
|
||||
export function hoursToMilliseconds(hours) {
|
||||
return Math.trunc(hours * millisecondsInHour);
|
||||
}
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default hoursToMilliseconds;
|
||||
|
||||
Reference in New Issue
Block a user