Example usage for java.util GregorianCalendar GregorianCalendar

List of usage examples for java.util GregorianCalendar GregorianCalendar

Introduction

In this page you can find the example usage for java.util GregorianCalendar GregorianCalendar.

Prototype

public GregorianCalendar(TimeZone zone, Locale aLocale) 

Source Link

Document

Constructs a GregorianCalendar based on the current time in the given time zone with the given locale.

Usage

From source file:MainClass.java

public static void main(String[] a) {
    GregorianCalendar calendar = new GregorianCalendar(TimeZone.getTimeZone("America/Chicago"), Locale.US);
    System.out.println(calendar);
}

From source file:Main.java

public static void main(String[] args) {

    GregorianCalendar cal = new GregorianCalendar(TimeZone.getDefault(), Locale.getDefault());

    System.out.println(cal.getTime());

}