Example usage for java.time.chrono ThaiBuddhistChronology INSTANCE

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

Introduction

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

Prototype

ThaiBuddhistChronology INSTANCE

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

Click Source Link

Document

Singleton instance of the Buddhist chronology.

Usage

From source file:Main.java

public static void main(String[] args) {
    ThaiBuddhistChronology thaiBuddhistChrono = ThaiBuddhistChronology.INSTANCE;
    ThaiBuddhistDate now = thaiBuddhistChrono.dateNow();
    ThaiBuddhistDate now2 = ThaiBuddhistDate.now();
    System.out.println("Current Date  in Thai  Buddhist: " + now);
    System.out.println("Current Date  in Thai  Buddhist: " + now2);
}

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));
}