Show Date : Date Format « I18N « Java






Show Date

Show Date
 

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

public class ShowDate {
  public static void main(String[] args) {
    DateFormat df = DateFormat.getDateTimeInstance(DateFormat.MEDIUM,
        DateFormat.MEDIUM, Locale.CANADA_FRENCH);
    System.out.println(df.format(new Date()));
  }
}

           
         
  








Related examples in the same category

1.Simple Date formatSimple Date format
2.Java I18N: Format : Date FormatJava I18N: Format : Date Format
3.Java I18N: Format : Date Format Symbols DemoJava I18N: Format : Date Format Symbols Demo
4.Demonstrate number and date internationalizationDemonstrate number and date internationalization
5.Use some locales choicesUse some locales choices
6.Format some values using the default locale
7.Formatting and Parsing a Time for a Locale Using Default Formats
8.Formatting and Parsing a Time for a Locale: specify the locale when creating the SimpleDateFormat object.
9.Formatting and Parsing a Date for a Locale: specify the locale when creating the SimpleDateFormat object.