Created
August 3, 2020 11:54
-
-
Save savitoh/e3f538b9ac95abf201ac2d3ae8b14e7b to your computer and use it in GitHub Desktop.
Classe utilitária para trabalhar com Datas em JAVA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class DateUtil { | |
private DateUtil () { | |
} | |
public static Long diferencaEmDias(Temporal dataInicio, Temporal dataFim) { | |
Objects.requireNonNull(dataInicio); | |
Objects.requireNonNull(dataFim); | |
return ChronoUnit.DAYS.between(dataInicio, dataFim); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment