Here you can find the source of formatTweetDate1(String date)
Convert a given date according to a format used by Twitter to String.
Parameter | Description |
---|---|
date | Tweet date value. |
private static String formatTweetDate1(String date)
//package com.java2s; public class Main { /**/*w w w . j a va 2s. c o m*/ * <p> * Convert a given date according to a format used by Twitter to String. For * instance, "2009-11-28 21:43:12" or "2009-11-28T21:43:12+00:00" to * "2009-11-28 21:43:12". * </p> * @param date Tweet date value. * @return Date. */ private static String formatTweetDate1(String date) { //2009-11-28 21:43:12 //2009-12-01T01:25:00+00:00 return date.substring(0, 10) + ' ' + date.substring(11, 19); } }