Afficher la date en format long

Author:



{filelink=5940}

import java.text.MessageFormat;
import java.util.Date;

public class FormatLong {
  public static void main(String[] argv) throws Exception {
    Object[] params = new Object[] { new Date() };
    String msg = MessageFormat.format("Date du jour: {0,date,long}",
        params);

    System.out.println(msg);
  }
}

Leave a Reply

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