Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
TeamSite
TeamSite, LiveSite and OpenDeploy
Bug in downloadable calendar
System
This probably won't bother anyone else for at least 80-90 years, but it was disrupting my sense of decency and order. The downloadable calendar callout has a bug in the code to determine whether a year is a leap year. It will incorrectly identify 1900, 2100, 2200, 2300, 2500 and so on as leap years. Here is the corrected code, beginning at line 167 if someone out there who has access to it should be inclined to patch it -
function getNoOfDaysInMnth(mnth,yr)
{
isCent = yr % 100;
is400 = yr % 400;
rem = yr % 4;
if(rem ==0 && (isCent != 0 || is400 == 0)) { leap = 1;}
else { leap = 0;}
Find more posts tagged with
Comments
There are no comments yet