extracted method to calculate day_fraction
refactoring