Android Date to Calendar Convert getCalendarField(Date date, int field)

Here you can find the source of getCalendarField(Date date, int field)

Description

get Calendar Field

Declaration

public static int getCalendarField(Date date, int field) 

Method Source Code

//package com.java2s;

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

public class Main {
    public static int getCalendarField(Date date, int field) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);//from  w ww .j a  va2  s .  c  om
        return calendar.get(field);
    }
}

Related

  1. getCalendar(Date date)
  2. getCalendarFromDate(Date date)
  3. calendarFromDate(Date d)
  4. calendarDate(Date date)
  5. convert(Date date)
  6. getCalendarFormDate(Date date)