create_calendar: Create a Scheduling Calendar

View source: R/server-create_calendar.R

create_calendarR Documentation

Create a Scheduling Calendar

Description

'create_calendar()' creates a calendar from a given 'schedule', 'start' date, 'end' date, and (if needed) 'anchor' date. Custom schedules can be used by setting 'schedule = "custom"' and providing the scheduling cycle via 'cycle'. The schedule can be saved to pdf with '.pdf = TRUE'; the file name is a standardized version of the title.

Usage

create_calendar(
  title = "Work Schedule",
  schedule = c("weekdays", "42", "5623", "custom"),
  start = "2021-01-01",
  end = "2021-12-31",
  anchor = start,
  cycle = NULL
)

Arguments

title

The title of the calendar

schedule

The schedule to use

start

The start date of the returned schedule; either a string in "YYYY-MM-DD" format or a 'Date' object

end

The end date of the returned schedule; either a string in "YYYY-MM-DD" format or a 'Date' object

anchor

The date from which to start ("anchor") schedule calculations. This can be any valid date; no particular relationship to 'start' or 'end' is needed. It must be either a string in "YYYY-MM-DD" format or a 'Date' object.

cycle

A logical vector defining one scheduling cycle. If named, names are passed to parse_weekday() for standardization of weekday names.

Value

A list defining the 'calendR' object


jesse-smith/schedules documentation built on July 21, 2022, 9:40 a.m.