Classe ‘Formatter’: Affichage de la date avec le nom du jour et du mois(Format long)

Author:


{filelink=5774}

import java.util.Calendar;
import java.util.Formatter;

public class DateLong {
  public static void main(String[] argv) throws Exception {
    Formatter fmt = new Formatter();
    Calendar cal = Calendar.getInstance();

    fmt.format("Format long de la date: %tA %1$td %1$tB , %1$tY", cal);
    System.out.println(fmt);
  }
}
//Format long de la date: samedi 20 ao�t , 2011

A Voir sur le même Sujet:

  • java afficher la date d'un jour

Leave a Reply

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