Here you can find the source of format(Calendar cal, String format, Locale locale)
Parameter | Description |
---|---|
cal | a parameter |
locale | a parameter |
public static String format(Calendar cal, String format, Locale locale)
//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()); } }