R/leapYear.r

Defines functions leapYear

# * Author:    Bangyou Zheng (Bangyou.Zheng@csiro.au)
# * Created:   15/04/2010
# *

# Judge a leap or common year
# @param year A numeric of year
# @return True for leap year or False for common year
leapYear <- function( year )
{
    return ( year %% 400 == 0 | ( year %% 4 == 0 & year %% 100 != 0 ) )
}

Try the weaana package in your browser

Any scripts or data that you put into this service are public.

weaana documentation built on Sept. 27, 2021, 5:12 p.m.