Example usage for java.time ZonedDateTime range

List of usage examples for java.time ZonedDateTime range

Introduction

In this page you can find the example usage for java.time ZonedDateTime range.

Prototype

@Override
public ValueRange range(TemporalField field) 

Source Link

Document

Gets the range of valid values for the specified field.

Usage

From source file:Main.java

public static void main(String[] args) {
    ZonedDateTime dateTime = ZonedDateTime.now();
    ValueRange l = dateTime.range(ChronoField.YEAR);
    System.out.println(l);//from  w  w  w .j a v a  2  s  .  co  m
}