MakeDate.js 328 B

12345678910111213
  1. 'use strict';
  2. var $isFinite = require('../helpers/isFinite');
  3. var msPerDay = require('../helpers/timeConstants').msPerDay;
  4. // https://262.ecma-international.org/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. };