Factorize isYesterday and isTomorrow