more precise warning date calculation