The TimeClip() operator is provided internally to convert implementation dependant numeric values to millisecond time values with a bounds check and sign handling fix up. Any date value is trimmed off and discarded, hence the name TimeClip().
Implementations may represent number values internally in many ways. Time computations need the millisecond value to be presented in a particular way. This operator does all the cleaning and conversion necessary.
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 and is probably not useful to have simulated in script form. It is documented in the standard to assist in the algorithmic breakdown of the Date method handlers and is covered here for the sake of completeness.
The result is a time value in milliseconds.
See also: | Broken down time, Date object, Date(), Date.setTime(), Date.UTC() |
Prev | Home | Next |
Time within day | Up | Timeout handlers |
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. |