If you are working with dates within javascript just take for notice two features. First is that numbers of months start with zero in the world of javasvript. And the second one and my favourite is that standard converter 'parseInt' sometimes behaves little wierd with strings which begins with zero. Take for example parseInt('08') and it will return zero. Obiviously it is so because such strings are considered to be in octal numeral system, but anyway be ware of such things if you store date in format like 09/04/11.
By the way function eval('08') still returns eight, but I don't think that it is good maner to use it.
Комментариев нет:
Отправить комментарий