minor day calculation fix