Created
August 11, 2016 15:24
-
-
Save maqnouch/032e2d453f5feb46004979fb7782889e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.text.*; | |
public class DateFrance | |
{ | |
public static void main(String[] argv) | |
{ | |
Date date = new Date( ); | |
// Créer une instance de dateFormat | |
DateFormat format = DateFormat.getInstance( ); | |
// Afficher la date en format par défaut | |
System.out.println(format.format(date)); | |
// définir un format personnalisé(France | |
DateFormat format_fr = | |
DateFormat.getDateInstance(DateFormat.FULL, Locale.FRENCH); | |
// Appliquer le format à la date | |
System.out.println(format_fr.format(date)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment