Here you can find the source of format(Date d)
Parameter | Description |
---|---|
d | The timestamp. |
public static String format(Date d)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static final SimpleDateFormat def = new SimpleDateFormat("HH:mm:ss dd.MM.yyyy"); /**//from w w w.j av a2 s.c o m * Format the millisecond timestamp to a human-readable timestamp. * * @param millis The timestamp. * @return A human-readable timestamp in the default format used in Maunium products. */ public static String format(long millis) { return def.format(new Date(millis)); } /** * Format the Date timestamp to a human-readable timestamp. * * @param d The timestamp. * @return A human-readable timestamp in the default format used in Maunium products. */ public static String format(Date d) { return def.format(d); } }