Java Calendar Day getCurDay(Calendar calendar)

Here you can find the source of getCurDay(Calendar calendar)

Description

get Cur Day

License

Open Source License

Declaration

public static int getCurDay(Calendar calendar) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Calendar;

import java.util.GregorianCalendar;

public class Main {

    public static int getCurDay() {
        return new GregorianCalendar().get(Calendar.DAY_OF_MONTH);
    }/*from w w  w  . j  a va 2  s .  c o  m*/

    public static int getCurDay(Calendar calendar) {
        if (calendar == null) {
            return getCurDay();
        }
        return calendar.get(Calendar.DAY_OF_MONTH);
    }
}

Related

  1. getAge(Calendar dateOfBirth, Calendar onThisDay)
  2. getBeginDay(Calendar cal)
  3. getCanonicalDay(Calendar cal)
  4. getCanonicalDayFrom(Calendar day, int daysFrom)
  5. getCleanDay(Calendar c)
  6. getDay(Calendar cal)
  7. getDay(Calendar calendar)
  8. getDay(Calendar calendar)
  9. getDayEndCalendar(Calendar cal)