Lines Matching refs:date

229         public Date parse(String date) throws ParseException {
230 return super.get().parse(date);
235 * Generate a time in milliseconds from a date string that represents a date/time in GMT
236 * @param date string in format 20090211T180303Z (rfc2445, iCalendar).
239 public static long parseDateTimeToMillis(String date) throws ParseException {
240 return parseDateTimeToCalendar(date).getTimeInMillis();
250 * Generate a GregorianCalendar from a date string that represents a date/time in GMT
251 * @param date string in format 20090211T180303Z (rfc2445, iCalendar), or
256 public static GregorianCalendar parseDateTimeToCalendar(String date) throws ParseException {
258 if (date.length() <= 8) {
259 cal.setTime(mAbbrevDateTimeFormat.parse(date));
261 cal.setTime(mFullDateTimeFormat.parse(date));
276 * Generate a time in milliseconds from an email date string that represents a date/time in GMT
277 * @param date string in format 2010-02-23T16:00:00.000Z (ISO 8601, rfc3339)
281 public static long parseEmailDateTimeToMillis(String date) throws ParseException {
283 if (date.length() <= 10) {
284 cal.setTime(mAbbrevEmailDateTimeFormat.parse(date));
285 } else if (date.length() <= 20) {
286 cal.setTime(mEmailDateTimeFormat.parse(date));
288 cal.setTime(mEmailDateTimeFormatWithMillis.parse(date));
398 * Try to make a date MIME(RFC 2822/5322)-compliant.
403 * We got a report saying eBay sends a date in this format
405 public static String cleanUpMimeDate(String date) {
406 if (TextUtils.isEmpty(date)) {
407 return date;
409 date = DATE_CLEANUP_PATTERN_WRONG_TIMEZONE.matcher(date).replaceFirst("$1");
410 return date;