Tests whether a date or year is a leap year.
For years outside [1000,3000), this returns NA.
This is an S3 generic. This package provides methods for:
numeric types
doubleandinteger(interpreted as years), anddate types
datey,Date,POSIXctandPOSIXlt.
Usage
is_leap_year(x, ...)
# Default S3 method
is_leap_year(x, ...)
# S3 method for class 'integer'
is_leap_year(x, ...)
# S3 method for class 'double'
is_leap_year(x, ...)
# S3 method for class 'datey'
is_leap_year(x, ...)
# S3 method for class 'Date'
is_leap_year(x, ...)
# S3 method for class 'POSIXct'
is_leap_year(x, ...)
# S3 method for class 'POSIXlt'
is_leap_year(x, ...)