List of utility methods to do Date Long Format
String | getLongDateString(Date date) get Long Date String return getLongDateString(date, TimeZone.getDefault());
|
String | getLongDateString(Date date, boolean includeTime) Returns long date string representation in localized format (e.g. if (includeTime) { return getDateTimeString(date, DateFormat.LONG, DateFormat.SHORT); } else { return getDateString(date, DateFormat.LONG); |
String | getLongDisplayDate(Date moment, TimeZone tz, Locale inLocale) Get the displayable date and time string for the given moment in time, in the given timezone, localized in long style. return getLongDisplayDate(moment, tz, inLocale, true);
|
String | getLongDisplayTime(long time) get Long Display Time Calendar cd = Calendar.getInstance(); cd.setTimeInMillis(time); Date date = cd.getTime(); if (date == null) { return null; DateFormat dateformat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); return dateformat.format(date); ... |
String | getLongFormatTime(java.util.Date date) get Long Format Time DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String strDate = df.format(date); return strDate; |
long | getLongFromDatestamp(String datestamp) Converts an ISO8601 UTC datastamp String of the form yyyy-MM-ddTHH:mm:ssZ to a long. return getDateFromDatestamp(datestamp, 0).getTime();
|
String | getLongGmtDateString(Date date) Converts a Date to the GMT timezone and formats it to the format yyyy-MM-dd HH:mm:ssZ. if (date == null) { return null; SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ"); simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); return simpleDateFormat.format(date); |
long | getLongMillis(String date) get Long Millis try { return dateTimeFormat.parse(date).getTime(); } catch (ParseException e) { return 0; |
String | getLongNowTime() get Long Now Time return getNowTime(yyyyMMddHHmmssSS);
|
Double | getLongOracleDateTime(Date date) get Long Oracle Date Time if (date == null) { return Double.NaN; long result = Long.parseLong(sdfYear.format(date)) * 10000000000L + Long.parseLong(sdfMonth.format(date)) * 100000000L + Long.parseLong(sdfDay.format(date)) * 1000000L + Long.parseLong(sdfHours.format(date)) * 10000L + Long.parseLong(sdfMinutes.format(date)) * 100L + Long.parseLong(sdfSeconds.format(date)); return Double.valueOf(result); ... |