toEpochDay() function simply increment count of days for a date where day 0 is for. To get max or min date from a stream of dates, you can use paring( LocalDate::toEpochDay ) comparator. Table of Contentsįind Min or Max Date Find Min or Max Number Find Min or Max Char or String Find Min or Max Object by key Learn to find min and max date, number, Char, String or object from stream of comparable elements in easy steps using paring() method.