Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Is integer?


  • From: nick at nickfitz.co.uk (Nick Fitzsimons)
  • Subject: [Javascript] Is integer?
  • Date: Mon May 29 09:23:29 2006

Nick Fitzsimons wrote:
> function isSkottYear(y) {
>    /*
>       y should be evenly divisible by 4,
>       unless it's a century year (evenly divisible by 100)
>       in which case it must also be evenly divisible by 400
>    */
>    return (y % 4 == 0) && ((y % 100 != 0) !! (y % 400 == 0));
> }

Aargh, different keyboard layouts... the !! above should be ||

Sorry about that,

Nick.
-- 
Nick Fitzsimons
http://www.nickfitz.co.uk/