Creates a daily calendar in R.

WeekDays(startOn = "Monday", abbreviate = FALSE)

dailyCalendar(
  startDate = Sys.Date(),
  days = 30,
  startOn = "Monday",
  fancy = FALSE
)

Arguments

startOn

The day of the week to start on. Defaults to "Monday".

abbreviate

Logical. Should the result be the abbreviated weekday name? Defaults to FALSE.

startDate

What should be the first date in the calendar? Defaults to Sys.Date().

days

How many days do you want in your calendar? Defaults to 30.

fancy

Logical. Should a more nicely formatted version of the calendar be displayed? Defaults to FALSE.

Value

A vector, a data.frame, or a list, depending on which function is called with what arguments.

Author

Ananda Mahto

Examples

WeekDays()
#> [1] "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday" #> [7] "Sunday"
WeekDays("Thursday", TRUE)
#> [1] "Thu" "Fri" "Sat" "Sun" "Mon" "Tue" "Wed"
dailyCalendar(startDate = "2013-12-27", days = 10)
#> Monday Tuesday Wednesday Thursday Friday Saturday Sunday #> 1: 2013-12-27 2013-12-28 2013-12-29 #> 2: 2013-12-30 2013-12-31 2014-01-01 2014-01-02 2014-01-03 2014-01-04 2014-01-05
dailyCalendar(startDate = "2013-12-27", days = 10, startOn = "Friday")
#> Friday Saturday Sunday Monday Tuesday Wednesday Thursday #> 1: 2013-12-27 2013-12-28 2013-12-29 2013-12-30 2013-12-31 2014-01-01 2014-01-02 #> 2: 2014-01-03 2014-01-04 2014-01-05
dailyCalendar(days = 40, fancy = TRUE)
#> $`June 2020` #> Monday Tuesday Wednesday Thursday Friday Saturday Sunday #> 1: 19 20 21 #> 2: 22 23 24 25 26 27 28 #> 3: 29 30 #> #> $`July 2020` #> Monday Tuesday Wednesday Thursday Friday Saturday Sunday #> 1: 01 02 03 04 05 #> 2: 06 07 08 09 10 11 12 #> 3: 13 14 15 16 17 18 19 #> 4: 20 21 22 23 24 25 26 #> 5: 27 28 #>