Java Calendar Create getCalendar()

Here you can find the source of getCalendar()

Description

month ranges from 1 to 12 (not 0 to 11)

License

Open Source License

Declaration

private static Calendar getCalendar() 

Method Source Code

//package com.java2s;

import java.util.Calendar;

import java.util.GregorianCalendar;
import java.util.Locale;
import java.util.TimeZone;

public class Main {
    /**//from  ww w . j  a  v  a 2  s. com
     * month ranges from 1 to 12 (not 0 to 11)
     */
    private static Calendar getCalendar() {
        return (getCalendar(null, null));
    }

    private static Calendar getCalendar(TimeZone timeZone, Locale locale) {
        if (timeZone == null)
            timeZone = TimeZone.getDefault();

        if (locale == null)
            locale = Locale.getDefault();

        Calendar c = new GregorianCalendar(timeZone, locale);
        return (c);
    }
}

Related

  1. getCalendar()
  2. getCalendar()
  3. getCalendar()
  4. getCalendar()
  5. getCalendar()
  6. getCalendar()
  7. getCalendar()
  8. getCalendar()
  9. getCalendar()