I actually added that, to save some bytes.
now() is a private function, that is reused 5 or 6 times along the
code.

1- new Date is the same as new Date().
2- +new Date casts the date object to number.
3- When dates are casted to numbers, they behave like new
Date().getTime().

So... that function returns a timestamp.
That is, the amount of milliseconds since midnight of January 1, 1970.

http://www.w3schools.com/jsref/jsref_getTime.asp

Cheers

--
Ariel Flesler
http://flesler.blogspot.com/

On 11 jun, 15:36, Doug D <[EMAIL PROTECTED]> wrote:
> I'm not familiar with the JavaScript syntax of "+new" in the now()
> function in jQuery 1.2.5. Would you explain the plus (+) operator? How
> does it work? What does it mean?
>
> function now(){
>     return +new Date;
>
> }
>
> Is it the same as the following?
>
> function now(){
>     return new Date();
>
>
>
> }- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -

Reply via email to