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 |
Prev | Home | Next |
main() function | Up | MakeDay() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |