calculating day, week and month spent time