is_good {fmdates} | R Documentation |
Good date checker
Description
Checks whether dates are business days (good days) in a given locale
represented by a Calendar
.
Usage
is_good(dates, calendar)
Arguments
dates |
a vector of dates |
calendar |
an object inheriting from either Calendar or JointCalendar. Dispatch to methods occurs on this argument. |
Details
An is_good
method must be written for each calendar. The default method
returns TRUE
for all dates. Methods have been implemented for each of the
calendars inheriting from the Calendar
class - see the method's code for
more details. The method implemented for the JointCalendar
class checks
whether the supplied dates are good in each or any of the locales represented
by the joint calendar depending on the rule specified by the joint calendar.
Value
a logical vector with TRUE
if the date is good and FALSE
if the
date is bad
See Also
Calendar
Other calendar methods: adjust
,
generate_schedule
,
is_valid_bdc
, is
,
locale
, shift
,
tz
Examples
is_good(lubridate::ymd(20160126, 20160411), AUSYCalendar())
is_good(lubridate::ymd(20160126), USNYCalendar())