The arguments start.date
and end.date
can be set but once they aren't and holidays
is set, start.date
is defined to min(holidays)
and end.date
to max(holidays)
.
If holidays isn't set start.date
is set to '1970-01-01'
and end.date
to '2071-01-01'
.
weekdays
is controversial but it is only a sequence of nonworking weekdays.
In the great majority of situations it refers to the weekend but it is also possible defining
it differently.
weekdays
accepts a character
sequence with lower case weekdays (
sunday
, monday
, thuesday
, wednesday
, thursday
,
friday
, saturday
).
This argument defaults to NULL
because the default intended behavior for
create.calendar
returns an actual calendar, so calling create.calendar(name="xxx")
returns a actual calendar named xxx.
(for more calendars see Day Count Convention)
To define the weekend as the nonworking weekdays one could simply
use weekdays=c("saturday", "sunday")
.
The arguments adjust.from
and adjust.to
are used to adjust bizdays
' arguments
from
and to
, respectively.
These arguments need to be adjusted when nonworking days are provided.
The default behavior, setting adjust.from=adjust.previous
and adjust.to=adjust.next
,
works like Excel's function NETWORKDAYS, since that is fairly used by a great number of practitioners.