package com.xc.test3;
import java.time.Duration;
import java.time.LocalDate;
import java.time.temporal.Temporal;
import java.time.temporal.TemporalAmount;
import java.time.temporal.TemporalUnit;
import java.util.List;
import java.util.Random;
public class MapTest {
public static void main(String[] args) {
// Random rand = new Random();
// int a =rand.nextInt(2);
LocalDate localDate=LocalDate.now();
//当前月份 SEPTEMBER
System.out.println("localDate.getMonth(): "+localDate.getMonth());
//当前年月日 xxxx-xx-xx
System.out.println("localDate: "+localDate);
//当前月份的第多少天
System.out.println("localDate.getDayOfMonth(): "+localDate.getDayOfMonth());
//当前年的第多少天
System.out.println("localDate.getDayOfYear(): "+localDate.getDayOfYear());
//加多少天后的年月日xxxx-xx-xx
System.out.println("localDate.plusDays(1000): "+localDate.plusDays(1000));
}
}
localDate.getMonth(): SEPTEMBER
localDate: 2018-09-11
localDate.getDayOfMonth(): 11
localDate.getDayOfYear(): 254
localDate.plusDays(1000): 2021-06-07