extract months_with_days calculation into DurationHelper module