Subtracting two dates sounds like primary-school math. Then leap years, time zones and weekends show up.