Functions to check for leap year in various languages:

Code: JavaScript
function isLeapyear(year)
   {
       return year%400 ==0 || (year%100 != 0 && year%4 == 0);
   }

Code: PHP
function is_lear_year($year)
   {
       return $year%400 ==0 || ($year%100 != 0 && $year%4 == 0);
   }

Code: Perl
sub{
       $year = shift;
       return 1 if($year%400 ==0 || ($year%100 != 0 && $year%4 == 0));
       # else ;-)
       return 0;
   }

Code: VB
Function IsLeapYear(y)
       If y Mod 400 = 0 Or (y Mod 100 <> 0 And y Mod 4 = 0) Then
           IsLeapYear = True
       Else
           IsLeapYear = False
       End If
   End Function