Java Calendar Create createCalendar()

Here you can find the source of createCalendar()

Description

Create a Calendar instance with default timezone.

License

Open Source License

Declaration

public static Calendar createCalendar() 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2009, 2016 GreenVulcano ESB Open Source Project.
 * All rights reserved./*from   w  w  w  . ja v  a 2 s  .com*/
 *
 * This file is part of GreenVulcano ESB.
 *
 * GreenVulcano ESB is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * GreenVulcano ESB is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with GreenVulcano ESB. If not, see <http://www.gnu.org/licenses/>.
 *******************************************************************************/

import java.util.Calendar;

import java.util.Locale;

import java.util.TimeZone;

public class Main {
    private static Locale locale = Locale.getDefault();
    private static TimeZone timeZone = TimeZone.getDefault();

    /**
     * Create a Calendar instance with default timezone.
     * 
     * @return
     */
    public static Calendar createCalendar() {
        return Calendar.getInstance(timeZone, locale);
    }
}

Related

  1. createCalendar()
  2. createCalendar()
  3. createCalendar()
  4. createCalendar()