Posted By

jgillman on 11/19/09


Tagged

year leap


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

jafar
tspitzr
dubogii


is leap year


 / Published in: ActionScript 3
 

Simple function for AS3 (or anything else really) that takes a year and returns a boolean.

  1. function isLeapYear(yr):Boolean {
  2. return (yr % 400 == 0) || ((yr % 4 == 0) && (yr % 100 != 0));
  3. }

Report this snippet  

You need to login to post a comment.