Converts dates to the corresponding numeric month.

monthNum(y)

Arguments

y

date

Author

Alan Jassby, James Cloern

Examples


monthNum(as.Date(c("2007-03-17", "2003-06-01")))
#> [1] 3 6