Add function to calculate notifications time period
bug fixes
ifx getDays