📜  java 将 java.util.Date 转换为 LocalDate - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:10.235000             🧑  作者: Mango

代码示例1
Date yourDate = new Date(); // this will be your java.util.Date instance to convert
LocalDate date = yourDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();