What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 20869 |  Welcome, Guest!   Register  Login
 Home > Code Snippets > JavaScript > How to get Leap Year using javascript ? ...
Dhiren.Kaunar@Gmail.Com

How to get Leap Year using javascript ?

 Code Snippet posted by: Dhiren.Kaunar@Gmail.Com | Posted on: 4/26/2012 | Category: JavaScript Codes | Views: 1303 | Status: [Member] | Points: 40 | Alert Moderator   


function isleap(year) {

var yr = year.value;
var isLeap = false;
if (yr % 400 == 0 || (yr % 100 != 0 && yr % 4 == 0)) {
isLeap = true;
}
else {
isLeap = false;
}
return isLeap;
}


Thanks & Rgards,
Dhiren Kumar Kaunar
Found interesting? Add this to:


>> Write Response - Respond to this post and get points

More codes snippets

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/23/2013 8:01:40 AM