GetYear Function in Java Script is not working properly in firefox

Hi Folks,

I have found that some times in firefox getyear function is not working properly. For example.We define a date value with following.

var dtTo = new Date("11-Feb-2007");

Now if you do alert like

Alert(dtTo.getYear());

But in firefix year is displaying like 107.So to fix this issue. I have used getFullYear function like

Alert(dtTo.getYear());

And It's working fine...

Comments

Popular posts from this blog

How to create Rest API(Web API) with ASP.NET Core 1.0

Creating PDF with ASP.Net MVC and RazorPDF

Solution: gulp is not recognized as internal or external command- Visual Studio