improved date test, and simple yield for design pattern