calcullate days