Android Calendar Format format(Calendar cal, String format, Locale locale)

Here you can find the source of format(Calendar cal, String format, Locale locale)

Description

format

Parameter

Parameter Description
cal a parameter
locale a parameter

Declaration

public static String format(Calendar cal, String format, Locale locale) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Locale;

public class Main {
    /**//from w  ww .  j  a  v a  2  s.  c o m
     * @param cal
     * @param locale
     * @return
     */
    public static String format(Calendar cal, String format, Locale locale) {
        SimpleDateFormat formatter = new SimpleDateFormat(format, locale);
        return formatter.format(cal.getTime());
    }
}

Related

  1. formateCalDavDue(Calendar c)
  2. getUniversalDateStamp(Calendar cal)
  3. getFormattedTime(Context context, Calendar time)
  4. getFormattedTime(Context context, Calendar time)
  5. calendar2string(Calendar calendar, String formatString)
  6. getCalendarFromDateString(String dateString, String format, Locale locale)
  7. getFormatedDate(Calendar c, String format)
  8. string2calendar(String s, String formatString)
  9. toSimpleDate(Calendar calendar, String format)