/**
* 去当日首尾秒
*
* @param args
*/
public static void main(String[] args) {
LocalDateTime now = LocalDateTime.now();
System.out.println(now.with(LocalTime.MIN)); // 当日最早一秒:2023-03-30 00:00:00
System.err.println(now.with(LocalTime.MAX)); // 当日最晚一秒:2023-03-30 23:59:59
}
Java取一日中的首尾秒
发布时间 2023-03-30 15:25:50作者: JaxYoun