Example usage for java.time Year until

List of usage examples for java.time Year until

Introduction

In this page you can find the example usage for java.time Year until.

Prototype

@Override
public long until(Temporal endExclusive, TemporalUnit unit) 

Source Link

Document

Calculates the amount of time until another year in terms of the specified unit.

Usage

From source file:Main.java

public static void main(String[] args) {
    Year y = Year.of(2014);
    long l = y.until(Year.of(2000), ChronoUnit.YEARS);
    System.out.println(l);//  w ww .  j  av a  2s.co  m

}