Java Calendar Create getCalendar()

Here you can find the source of getCalendar()

Description

get GregorianCalendar.

License

Open Source License

Return

Calendar,GregorianCalendar.

Declaration

public static Calendar getCalendar() 

Method Source Code

//package com.java2s;

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

public class Main {
    /**/*  ww w . ja  va 2 s.  c o  m*/
     * get GregorianCalendar.
     * 
     * @return Calendar,GregorianCalendar.
     */
    public static Calendar getCalendar() {
        return new GregorianCalendar();
    }

    /**
     * get GregorianCalendar with given date.
     * 
     * @param date Date.
     * @return Calendar, GregorianCalendar.
     */
    public static Calendar getCalendar(Date date) {
        Calendar calendar = getCalendar();
        calendar.setTime(date);
        return calendar;
    }
}

Related

  1. createResetCalendar()
  2. createTimestampStr(Calendar para_calendar)
  3. getCalendar()
  4. getCalendar()
  5. getCalendar()
  6. getCalendar()
  7. getCalendar()
  8. getCalendar()
  9. getCalendar()