This is less humane than @joran's answer :), but it does not depend on local time
dd <- seq(as.Date('2011-01-01'),as.Date('2011-12-31'),by = 1) dd[! (as.POSIXlt(dd)$wd %in% c(0,1))]
PS: another option is to set the locales before applying weekdays
tt <- Sys.getlocale('LC_TIME') Sys.setlocale('LC_TIME','ENGLISH') dd <- dd[!weekdays(x) %in% c('Saturday','Sunday')] Sys.setlocale('LC_TIME',tt)
source share