[Javascript] Is integer?
Nick Fitzsimons
nick at nickfitz.co.uk
Mon May 29 09:23:12 CDT 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/
More information about the Javascript
mailing list