Java Date String Format formatTweetDate1(String date)

Here you can find the source of formatTweetDate1(String date)

Description

Convert a given date according to a format used by Twitter to String.

License

Open Source License

Parameter

Parameter Description
date Tweet date value.

Return

Date.

Declaration

private static String formatTweetDate1(String date) 

Method Source Code

//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);
    }
}

Related

  1. formatISODate(String date)
  2. formatMinDateForShowWith_(String str)
  3. formatQuery(String queryDate)
  4. formatShort(String strDate)
  5. formatShow(String queryDate)