Feedback on: Blind Date
Worth:
Very worth reading
Length:
Just right
Technical:
Just right
Comments:
Just what I needed!
Worth:
Very worth reading
Length:
Just right
Technical:
Just right
Comments:
Article has Y2K AND Y1K bugs.
Y2K reads (year < 1000), should read < 100. If someone enters a year of 850, then you don't want to change it! The Y2K bug just needs changing to + 2000 instead of 1900 and renaming the function to Y3K. Should be good for a thousand years then.
Worth:
Very worth reading
Comments:
good article, but i think
your LeapYear function is
slightly off...
according to the Calendar FAQ
(http://www.faqs.org/faqs/calendars/faq/part1/)...
"Every year divisible by 4 is a leap year. However, every year divisible by 100 is not a leap year. However, every year divisible by 400 is a leap year after all."
to properly implement this logic,
you'd have to do something along
the lines of:
function LeapYear(year)
{ var isleapyear = false;
if(year % 100 != 0 && year % 4 == 0)
isleap = true;
else if(year % 400 == 0)
isleapyear = true;
return isleapyear;
}