DateFormat.FULL : DateFormat « java.text « Java by API






DateFormat.FULL

 
/*
 * Output:
Japan: 4/28/06
Korea: Apr 28, 2006
United Kingdom: 28 April 2006
United States: Friday, April 28, 2006
 * */

import java.text.DateFormat;
import java.util.Date;
import java.util.Locale;

public class MainClass {
  public static void main(String args[]) {
    Date date = new Date();
    DateFormat df;

    df = DateFormat.getDateInstance(DateFormat.SHORT, Locale.JAPAN);
    System.out.println("Japan: " + df.format(date));

    df = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.KOREA);
    System.out.println("Korea: " + df.format(date));

    df = DateFormat.getDateInstance(DateFormat.LONG, Locale.UK);
    System.out.println("United Kingdom: " + df.format(date));

    df = DateFormat.getDateInstance(DateFormat.FULL, Locale.US);
    System.out.println("United States: " + df.format(date));
  }
}

           
         
  








Related examples in the same category

1.DateFormat.LONG
2.DateFormat.MEDIUM
3.DateFormat.SHORT
4.DateFormat: format(Date date)
5.DateFormat: getAvailableLocales()
6.DateFormat: getDateInstance(int style,Locale aLocale)
7.DateFormat: getDateTimeInstance(int dateStyle, int timeStyle)
8.DateFormat: getTimeInstance(int style,Locale aLocale)
9.DateFormat: parse(String dateString)
10.DateFormat: setLenient(boolean lenient)