I'm missing something, but I cannot find any hint online. When I use Javascript's getTime() function it seems it does not count from 1970, 01, 01, 0, 0, 0, 0 i.e. midnight 1970, but from 1969, 12, 01, 1, 0, 0, 0
I set up following:
var d = new Date(1970, 01, 01, 0, 0, 0, 0);
alert(d.getTime());
with idea in my mind that I should get 0 (since no time passed). But I get 2674800000 msec
If I set:
var d = new Date(1969, 12, 01, 1, 0, 0, 0);
alert(d.getTime());
I get 0 msec
I played with the function also on W3C site and the result is the same.
Also when I calculate difference between two dates - now and beginning of this year, it does not return correct value:
var Now = new Date ();
var Begin = new Date (Now.getFullYear(), 01, 01);
var dif = Now.getTime() - Begin.getTime();
alert(dif);
I get miliseconds that correspond to approx. 59 days
I'm quite sure I fail to see something as I'm still a programming toddler. I appreciate any comments