I am trying to get 3 month back, and tried many different solutions posted here. The one that generally works fine is dt %m+% months(-3)
from this post. however, it is not working well again for this month. I wonder if there is a ultimate final working fine solution.
dt_1 <- as.Date("2018-06-30")
dt_2 <- as.character(dt_1 %m+% months(-3))
dt_2 became "2018-03-30" instead of "2018-03-31".