Here you can find the source of getDay(Calendar calendar)
Parameter | Description |
---|---|
calendar | a parameter |
public static int getDay(Calendar calendar)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.Date; public class Main { /**//from ww w.j a v a 2 s . com * @param calendar * @return int com o dia do Calendar passado */ public static int getDay(Calendar calendar) { return calendar.get(Calendar.DAY_OF_MONTH); } /** * @param data * @return int com o dia do Date passado */ public static int getDay(Date data) { Calendar dataCal = Calendar.getInstance(); dataCal.setTime(data); return dataCal.get(Calendar.DAY_OF_MONTH); } }