Skip to content

Commit

Permalink
Renamed has.calendar to has.calendars
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonfreitas committed Apr 11, 2017
1 parent 655dafd commit e2e7c1c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export(bizseq)
export(calendars)
export(create.calendar)
export(following)
export(has.calendar)
export(has.calendars)
export(is.bizday)
export(load_quantlib_calendars)
export(load_rmetrics_calendars)
Expand Down
4 changes: 2 additions & 2 deletions R/calendar.R
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ check_calendar <- function(cal) {
#' @export
#' @rdname calendar-register
#' @examples
#' has.calendar(c("actual", "weekends"))
has.calendar <- function(cals) {
#' has.calendars(c("actual", "weekends"))
has.calendars <- function(cals) {
cals %in% ls(.CALENDAR_REGISTER)
}
5 changes: 3 additions & 2 deletions man/calendar-register.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tests/testthat/test-register.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ test_that('it should remove a calendar', {

test_that("it should check if a calendar exists", {
create.calendar("actual")
expect_true(has.calendar("actual"))
expect_false(has.calendar("nama"))
expect_equal(has.calendar(c("actual", "weekends", "nama")), c(TRUE, TRUE, FALSE))
expect_true(has.calendars("actual"))
expect_false(has.calendars("nama"))
expect_equal(has.calendars(c("actual", "weekends", "nama")), c(TRUE, TRUE, FALSE))
})

0 comments on commit e2e7c1c

Please sign in to comment.