MakeDate() (Time calculation)

A date and time algorithm.


ECMAScript edition - 2
Property/method value type:Number primitive

The MakeDate() operator calculates a number of milliseconds from its two arguments. Both arguments must be ECMAScript number values.

All of the arguments must be numeric and finite values. The values should be integers. If they are not then the result will be NaN.

The day argument is multiplied by the milliseconds per day and the time argument is added to the result. The sum of the two is a millisecond coded date and time value.

Although this is called an operator in the standard, its behavior is more like that of a function. It is not part of the formal language implementation but is a useful function to have available, and can be simulated by writing a script based function. It is documented in the standard to assist in the algorithmic breakdown of the Date method handlers.

The result is a date value in milliseconds since the base date.

See also:Cast operator, Date object, Date(), Date.UTC(), Time range, Time value


ECMA 262 edition 2 - section -

ECMA 262 edition 3 - section -