Fixed off-by-one error with date ranges in a few places (fixes #8)