Randy Posted March 3, 2006 Share Posted March 3, 2006 [code]Date = new Date();Year = parseFloat(Date.getYear());if((round((Year+1900)/4)) == ((Year+1900)/4)){ leap = 29;}else{ leap = 28;}[/code]something seems to be wrong, i don't really know what...thanks in advance Link to comment https://forums.phpfreaks.com/topic/4040-something-wrong/ Share on other sites More sharing options...
fusionpixel Posted March 6, 2006 Share Posted March 6, 2006 It is Math.round instead of just round.[code]Date = new Date();Year = parseFloat(Date.getYear());if((Math.round((Year+1900)/4)) == ((Year+1900)/4)){ leap = 29;}else{ leap = 28;}[/code] Link to comment https://forums.phpfreaks.com/topic/4040-something-wrong/#findComment-14608 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.