[Gambas-user] Unix Date conversion

Laurent Carlier lordheavym at ...626...
Mon Jul 24 16:15:42 CEST 2006


Le lundi 24 juillet 2006 16:06, frame down under a écrit :
> benoit,
>
> Leap years are years that are divisible by 4, except if they are
> divisible by 400.
>
> The year 2000 was not a leap year.
>
> Thnx
>

the good formula ?

--

PUBLIC FUNCTION checkYear(value AS Integer) AS Boolean
  
  IF ((((value MOD 4) = 0) AND (value MOD 100) <> 0) OR ((value MOD 400) = 0))
    RETURN TRUE
  ELSE 
    RETURN FALSE
  ENDIF
  
END

--

Regards,





More information about the User mailing list