How do you return "October" from x in this code?
x<-as.Date("2018-10-01")
as.month(x)
months(x)
month(x)
attr()