List of utility methods to do Day Get
String | getAfterDate(Date date, int days) get After Date SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Calendar calendar = Calendar.getInstance(); calendar.setTime(date); calendar.set(Calendar.DAY_OF_YEAR, calendar.get(Calendar.DAY_OF_YEAR) + days); return df.format(calendar.getTime()); |
long | fromJulianDay(double julianDay) Creates a date-time from a Julian Day. double epochDay = julianDay - 2440587.5d; return (long) (epochDay * 86400000d); |
long | getTimeNextDay(long lTimeMillis) get Time Next Day Date date = new Date(lTimeMillis); Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.add(Calendar.DAY_OF_YEAR, 1); Date dateNext = cal.getTime(); return dateNext.getTime(); |
int | getDaysTo(Date date) get Days To return (int) ((date.getTime() - getCurrentEpochTime()) / ONE_DAY_IN_MILLIS); |
String | intDayToString(int day) int Day To String return daysOfWeek[day];
|
int | leapDays(int y) leap Days if (leapMonth(y) != 0) { if ((lunarInfo[y - 1900] & 0x10000) != 0) return 30; else return 29; } else return 0; |
int | getDay() get Day return Calendar.getInstance().get(Calendar.DAY_OF_MONTH);
|
String | dayIndexToDate(int dayindex) day Index To Date int year = 2013; int month = 7; int day = 6; Calendar cal = Calendar.getInstance(); cal.set(year, month - 1, day); cal.add(Calendar.DAY_OF_MONTH, dayindex - 1); return new SimpleDateFormat("EEEEEEEE dd").format(cal.getTime()); |