I need this programmed...
View Single Post
11-16-2012, 02:55 AM
Supreme Master coder!
Join Date: Feb 2009
Thanked 4,307 Times in 4,274 Posts
Leap year is easy:
var leap = ( year % 4 ) == 0;
Code looks basically right, but I don't see any need for a switch if done right.
Instead, just have an array of month names and index into the array by the month number.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
View Public Profile
Find More Posts by Old Pedant