We can find number of days between two dates in groovy by using the Date class. Creating an instance of today and yesterday we can determine the number of days separating by calling the date.minus() or using the - operator. In a comparable example we demonstrate how to find the difference between two dates in days using java.