# Monthly sequence
x <- seq(year_month_day(2019, 1), year_month_day(2020, 12), by = 1)
x
# Which we can then set the day of to get a sequence of end-of-month values
set_day(x, "last")
# Daily sequences are not allowed. Use a naive-time for this instead.
try(seq(year_month_day(2019, 1, 1), by = 2, length.out = 2))
seq(as_naive_time(year_month_day(2019, 1, 1)), by = 2, length.out = 2)
Run the code above in your browser using DataLab