Example usage for java.time YearMonth compareTo

List of usage examples for java.time YearMonth compareTo

Introduction

In this page you can find the example usage for java.time YearMonth compareTo.

Prototype

@Override
public int compareTo(YearMonth other) 

Source Link

Document

Compares this year-month to another year-month.

Usage

From source file:Main.java

public static void main(String[] args) {
    YearMonth y = YearMonth.now();
    System.out.println(y.compareTo(YearMonth.now()));

}