TimeClip() (Time calculation)

A date and time algorithm.


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

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()


ECMA 262 edition 2 - section -

ECMA 262 edition 3 - section -