package J20250808.localDateTime;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 * @author WanJl
 * @version 1.0
 * @title Demo02_LocalDateTimeTest
 * @description
 * @create 2025/8/8
 */
public class Demo02_LocalDateTimeTest {
    public static void main(String[] args) {
        //获取当前系统的时间
        LocalDateTime dateTime = LocalDateTime.now();
        System.out.println(dateTime);
        LocalDate date = dateTime.toLocalDate();
        System.out.println(date);
        LocalTime time = dateTime.toLocalTime();
        System.out.println(time);

    }
}
