Skip to content

Commit

Permalink
Assertion added for cut date not to be NULL #181
Browse files Browse the repository at this point in the history
  • Loading branch information
barnett11 committed Jan 26, 2024
1 parent 05e4ad1 commit dfb5ae0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/create_dcut.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ create_dcut <- function(dataset_ds,
must be stored in ISO 8601 format."
)

# Check that cut date is not NULL
assert_that(!is.null(cut_date),
msg = "Cut date is NULL, please populate as NA or valid ISO8601 date format"
)

# Check that cut_date is in ISO 8601 format
valid_dtc <- is_valid_dtc(cut_date)
assert_that(valid_dtc,
Expand Down

0 comments on commit dfb5ae0

Please sign in to comment.