Home > Back-end >  R -sequence of dates for non-gregorian calendar
R -sequence of dates for non-gregorian calendar

Time:08-25

I would like to get a sequence of dates for a year with 12 months- 30 days each (so no Gregorian calendar), and I am wondering if there is some workaround in seq.Date or seq.IDate (data.table). Thank you!

CodePudding user response:

  • We can try this
as.Date(paste0( "2022/",rep(1:12 , each = 30) ,"/", rep(1:30 , times = 12)))
  • Related