快速打开Groovy In Action书籍,找到以下应该有用的示例:
def today = new Date() def yesterday = today-1 assert (yesterday..today).size() == 2