R/project_hours_check_date.R

Defines functions check_date

check_date<-function(date,db){
require(dplyr)
    yr<-lubridate::year(date)
    mnth<-lubridate::month(date)
    wk<-lubridate::isoweek(date)
    tbl(db,"projecthours") %>% 
        filter(year==yr,week==wk) %>% 
        count() %>% 
        collect() %>% 
        .$n != 0
}
JARS3N/LLP documentation built on Jan. 24, 2023, 12:12 a.m.