java.time.OffsetDateTime.query() 方法示例


java.time.OffsetDateTime.query() 方法示例

package com.codingdict;

import java.time.OffsetDateTime;
import java.time.temporal.TemporalQueries;

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

      OffsetDateTime date = OffsetDateTime.parse("2014-12-03T10:15:30+01:00");
      System.out.printf("OffsetDateTime precision is %s%n",
         date.query(TemporalQueries.precision()));
   }
}