Here you can find the source of getFullTimestampFormatter(Locale locale)
public static DateFormat getFullTimestampFormatter(Locale locale)
//package com.java2s; //License from project: Open Source License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Locale; public class Main { public static final String DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss"; public static DateFormat getFullTimestampFormatter(Locale locale) { DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM, locale); String localeString = locale.toString(); if (localeString.equals("zh_SG")) { return new SimpleDateFormat("dd/MM/yyyy a hh:mm"); } else if (localeString.equals("ko")) { return changeDateFormatPattern(dateFormat, "y+\\. *M+\\. *d+", "yyyy-MM-dd"); }/*from w w w .ja v a 2 s. c o m*/ // change year format to long format (e.g. 2012) return changeDateFormatPattern(dateFormat, "y+", "yyyy"); } public static SimpleDateFormat getFullTimestampFormatter() { return new SimpleDateFormat(DATE_TIME_FORMAT); // m_fullTimestampFormatter; } private static DateFormat changeDateFormatPattern(final DateFormat dateFormat, String regex, String replacement) { if (dateFormat instanceof SimpleDateFormat) { SimpleDateFormat simpleDateFormat = (SimpleDateFormat) dateFormat; String pattern = simpleDateFormat.toPattern().replaceAll(regex, replacement); simpleDateFormat.applyPattern(pattern); return simpleDateFormat; } return dateFormat; } }