support for date granularities added

added function using dplyr in helpers