Affichage de la date en format français, allemand, chinois et italien

Author:


{filelink=6025}

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

public class FormatDateParPays {
  public static void main(String[] args) {
    System.out.printf(Locale.ITALIAN, "Date Italienne:%tcn", new Date());
    System.out.printf(Locale.CHINA, "Date Chinoise: %tcn", new Date());
    System.out.printf(Locale.FRENCH, "Date Fran�aise: %tcn", new Date());
    System.out.printf(Locale.GERMAN, "Date format Allemand: %tc", new Date());
  }

}
/*
Date Italienne:lun ago 22 02:14:44 GMT 2011
Date Chinoise: ??? ?? 22 02:14:44 GMT 2011
Date Fran�aise: lun. ao�t 22 02:14:44 GMT 2011
Date format Allemand: Mo Aug 22 02:14:44 GMT 2011
 */

Leave a Reply

Your email address will not be published. Required fields are marked *