java.time.LocalDateTime.range() 方法示例


java.time.LocalDateTime.range() 方法示例

package com.codingdict;

import java.time.LocalDateTime;
import java.time.temporal.ChronoField;

public class LocalDateTimeDemo {
   public static void main(String[] args) {

      LocalDateTime date = LocalDateTime.parse("2014-12-03T10:15:30");
      System.out.println("Range : " + date.range(ChronoField.DAY_OF_YEAR ));
   }
}