Jump to content

Archived

This topic is now archived and is closed to further replies.

Randy

Something Wrong :/

Recommended Posts

[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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.