fixed days calculation issue