You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MakeDate.js 333B

12345678910111213
  1. 'use strict';
  2. var $isFinite = require('../helpers/isFinite');
  3. var msPerDay = require('../helpers/timeConstants').msPerDay;
  4. // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.13
  5. module.exports = function MakeDate(day, time) {
  6. if (!$isFinite(day) || !$isFinite(time)) {
  7. return NaN;
  8. }
  9. return (day * msPerDay) + time;
  10. };