Trouble with .GetMonth ()
02.11.2011 11:46:07 In its CMS decided to make the substitution date on JavaScript and not notice the strange features .getMonth ()The whole point of use .getMonth() in Javascript is that it is necessary to add one function to output the correct number of the month.
I do not know why, I think developers are likely to Javascript for a long time something smoked and drankbeer the whole thing, and maybe a bit stronger than.
In general, an example of correct usage:
d = new Date();
alert (d.getMonth() + 1);
Well, more understandable when the indexes are in the array from scratch, but why is not clear months,because of the strangeness of this article for almost a month on my blog stood with incorrect dates. Of course my own fault :) had to pass nearly two dozen news.
The world is full of incomprehensible programming :)
Рейтинг $r-- [0] $r++
Показать коментарии (vkontakte.ru)}