Example usage for java.time.chrono JapaneseChronology INSTANCE

List of usage examples for java.time.chrono JapaneseChronology INSTANCE

Introduction

In this page you can find the example usage for java.time.chrono JapaneseChronology INSTANCE.

Prototype

JapaneseChronology INSTANCE

To view the source code for java.time.chrono JapaneseChronology INSTANCE.

Click Source Link

Document

Singleton instance for Japanese chronology.

Usage

From source file:Main.java

public static void main(String[] args) {
    LocalDate date = LocalDate.of(1996, Month.OCTOBER, 29);
    System.out.printf("%s%n", toString(date, JapaneseChronology.INSTANCE));
    System.out.printf("%s%n", toString(date, MinguoChronology.INSTANCE));
    System.out.printf("%s%n", toString(date, ThaiBuddhistChronology.INSTANCE));
    System.out.printf("%s%n", toString(date, HijrahChronology.INSTANCE));

    System.out.printf("%s%n", fromString("10/29/0008 H", JapaneseChronology.INSTANCE));
    System.out.printf("%s%n", fromString("10/29/0085 1", MinguoChronology.INSTANCE));
    System.out.printf("%s%n", fromString("10/29/2539 B.E.", ThaiBuddhistChronology.INSTANCE));
    System.out.printf("%s%n", fromString("6/16/1417 1", HijrahChronology.INSTANCE));
}