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/LiveLongAndProsper documentation built on June 21, 2020, 12:49 p.m.