List of utility methods to do Day in Month Get
String | getStringDayOfMonth(Date date) get String Day Of Month SimpleDateFormat sdf = new SimpleDateFormat("dd"); return sdf.format(date); |
String | getFirstDayOfMonth(String format) get First Day Of Month String strDate = null; try { Calendar c = new GregorianCalendar(); SimpleDateFormat mSimpleDateFormat = new SimpleDateFormat( format); c.set(GregorianCalendar.DAY_OF_MONTH, 1); strDate = mSimpleDateFormat.format(c.getTime()); } catch (Exception e) { ... |
String | getFirstDayOfMonth(String format) get First Day Of Month String strDate = null; try { Calendar c = new GregorianCalendar(); SimpleDateFormat mSimpleDateFormat = new SimpleDateFormat( format); c.set(Calendar.DAY_OF_MONTH, 1); strDate = mSimpleDateFormat.format(c.getTime()); } catch (Exception e) { ... |
String | getLastDayOfMonth(String format) get Last Day Of Month String strDate = null; try { Calendar c = new GregorianCalendar(); SimpleDateFormat mSimpleDateFormat = new SimpleDateFormat( format); c.set(Calendar.DATE, 1); c.roll(Calendar.DATE, -1); strDate = mSimpleDateFormat.format(c.getTime()); ... |
String | getLastDayOfMonth(String format) get Last Day Of Month String strDate = null; try { Calendar c = new GregorianCalendar(); SimpleDateFormat mSimpleDateFormat = new SimpleDateFormat( format); c.set(Calendar.DATE, 1); c.roll(Calendar.DATE, -1); strDate = mSimpleDateFormat.format(c.getTime()); ... |
Date | firstDayOfMonth(Date date) first Day Of Month Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.set(Calendar.DAY_OF_MONTH, Calendar.getInstance() .getActualMinimum(Calendar.DAY_OF_MONTH)); cal.set(Calendar.HOUR_OF_DAY, Calendar.getInstance() .getActualMinimum(Calendar.HOUR_OF_DAY)); cal.set(Calendar.MINUTE, Calendar.getInstance().getActualMinimum(Calendar.MINUTE)); ... |
Date | lastDayOfMonth(Date date) last Day Of Month Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.set(Calendar.DAY_OF_MONTH, Calendar.getInstance() .getActualMaximum(Calendar.DAY_OF_MONTH)); cal.set(Calendar.HOUR_OF_DAY, Calendar.getInstance() .getActualMaximum(Calendar.HOUR_OF_DAY)); cal.set(Calendar.MINUTE, Calendar.getInstance().getActualMaximum(Calendar.MINUTE)); ... |
int | monthDays(int y, int m) month Days if ((lunarInfo[y - 1900] & (0x10000 >> m)) == 0) return 29; else return 30; |