Java Calendar Create getCalendar(int d, int m, int y)

Here you can find the source of getCalendar(int d, int m, int y)

Description

get Calendar

License

Mozilla Public License

Declaration

public static Calendar getCalendar(int d, int m, int y) 

Method Source Code

//package com.java2s;
/* This file is part of the MayDesk project.
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.*///from   ww w .j  a v  a  2 s . c  o m

import java.util.Calendar;

public class Main {
    public static Calendar getCalendar(int d, int m, int y) {
        Calendar cal = Calendar.getInstance();
        cal.set(Calendar.DAY_OF_MONTH, d);
        cal.set(Calendar.MONTH, m);
        cal.set(Calendar.YEAR, y);
        return cal;
    }
}

Related

  1. getCalendar(boolean skipConversion)
  2. getCalendar(Calendar cal, int relativeDay)
  3. getCalendar(final Date dateAndTime)
  4. getCalendar(final long timeInMillis)
  5. getCalendar(final String isodate)
  6. getCalendar(int dayOfWeek, int atHour, int atMinute)
  7. getCalendar(int year, int month, int date)
  8. getCalendar(int year, int month, int day)
  9. getCalendar(int year, int month, int day)