java.time.LocalDate.isSupported() 方法示例


java.time.LocalDate.isSupported() 方法示例

package com.codingdict;

import java.time.LocalDate;
import java.time.temporal.ChronoField;

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

      LocalDate date = LocalDate.parse("2020-02-03");
      System.out.println(date.isSupported(ChronoField.ERA));  
   }
}