Android Calendar Create getCalendar(int day, int month, int year)

Here you can find the source of getCalendar(int day, int month, int year)

Description

get Calendar

Declaration

private static Calendar getCalendar(int day, int month, int year) 

Method Source Code

//package com.java2s;
import java.util.*;
import static java.util.Calendar.*;

public class Main {
    private static Calendar getCalendar(int day, int month, int year) {
        Calendar cal = getInstance(new SimpleTimeZone(0, "GMT"));
        cal.clear();/*from w w  w .j  a  v a 2 s .  co m*/
        cal.set(YEAR, year);
        cal.set(MONTH, month);
        cal.set(DAY_OF_MONTH, day);
        return cal;
    }
}

Related

  1. getDateWithShortFormat(int year, int month, int day)
  2. getMilliSeconds(int year, int month, int day, int hour, int minute)
  3. getNowTime()
  4. GetLocalCalendar()
  5. getCalendar()