Android Date Format formatDate(Date date, String pattern, Locale locale)

Here you can find the source of formatDate(Date date, String pattern, Locale locale)

Description

format Date

Declaration

public static String formatDate(Date date, String pattern, Locale locale) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;
import java.util.Locale;

public class Main {
    public static String formatDate(Date date, String pattern) {
        return formatDate(date, pattern, Locale.getDefault());
    }//from   w ww.j  a v a  2 s . c  o m

    public static String formatDate(Date date, String pattern, Locale locale) {
        SimpleDateFormat dateFormat = new SimpleDateFormat(pattern, locale);
        return dateFormat.format(date);
    }
}

Related

  1. formatDataTime(Date date)
  2. formatDate(Date date)
  3. formatDate(Date date)
  4. formatDate(Date date)
  5. formatDate(Date date, String pattern)
  6. format(Date d, String dateFormat)
  7. getShortFriendlyDate(Date dt)
  8. getFormatDateString(String format)
  9. getFormatDateString(String format, java.util.Date date)