feat: TimeUtil#yesterday
This commit is contained in:
parent
2c0e524549
commit
5fbee39d56
1 changed files with 4 additions and 0 deletions
|
@ -35,6 +35,10 @@ public class TimeUtil {
|
||||||
return LocalDate.now();
|
return LocalDate.now();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static LocalDate yesterday() {
|
||||||
|
return today().minusDays(1);
|
||||||
|
}
|
||||||
|
|
||||||
public static LocalDate convert(Date dateToConvert) {
|
public static LocalDate convert(Date dateToConvert) {
|
||||||
return dateToConvert.toInstant()
|
return dateToConvert.toInstant()
|
||||||
.atZone(ZoneId.systemDefault())
|
.atZone(ZoneId.systemDefault())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue