Monday, February 11, 2008

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


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


And It's working fine...



Post a Comment

Your feedback is very important to me. Please provide your feedback via putting comments.

Search This Blog
About Me
My Photo

Full Stack Developer, Blogger, Microsoft Mvp, Mentor, Lifelong learner, 12+ Years of Experience for JavaScript, web and Microsoft technologies. ASP.NET MVC/Core, C#, Angular,Vue.js and node.js
Subscribe to my blog


My You tube channel- Please Subscribe
Youtube Video Playlist
My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews