Examples for 'lubridate::leap_year'


Is a year a leap year?

Aliases: leap_year

Keywords: chron logic

### ** Examples

x <- as.Date("2009-08-02")
leap_year(x) # FALSE
[1] FALSE
leap_year(2009) # FALSE
[1] FALSE
leap_year(2008) # TRUE
[1] TRUE
leap_year(1900) # FALSE
[1] FALSE
leap_year(2000) # TRUE
[1] TRUE

[Package lubridate version 1.8.0 Index]