Factored out total day calculation; we can now do date subtraction with timedeltas and alternate dates. we should do timedates too