Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Tina815 authored Nov 21, 2023
1 parent 80063f1 commit d9ccf46
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions R/extract_fin_year.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ extract_fin_year <- function(date) {
not a {.cls {class(date)}} vector.")
}

# Simply converting all elements of the input vector resulted in poor
# performance for large vectors. The function was rewritten to extract
# a vector of unique elements from the input, convert those to financial year
# and then match them back on to the original input. This vastly improves
# performance for large inputs.

# Note: lubridate year and month coerce to double
# We only need integers for our purposes
posix <- as.POSIXlt(date, tz = lubridate::tz(date))
Expand Down

0 comments on commit d9ccf46

Please sign in to comment.