java calculate how much time passed between dates code example Example: calculate time java System.out.println(LocalTime.now());