phelps.text
public class Formats extends Object
(long)
,
Formats, pretty.
Additional pretty printing available in other classes:
URIs,
Files,
Integers,
Integers
Version: $Revision: 1.4 $ $Date: 2003/07/26 02:14:32 $
Method Summary | |
---|---|
static long | parseDate(String sdate)
Parse sdate and pass on to Formats.
|
static String | pretty(Rectangle2D r) Compact output for a Rectangle: widthxheight @ (x,y). |
static String | prettySeconds(int sec) Formats seconds as days/HH:MM:SS . |
static String | prettySize(long bytes) Given a byte count, returns a string in more human-readable form; e.g., 13*1024*1024 => "13MB". |
static String | relativeDate(long date) Display date relative to now. |
static String | relativeDate(long date, long relativeTo)
Display date, in the standard Java milliseconds since 1970, relative to relativeTo,
using relations like "yesterday" and "3 hours ago". |
days/HH:MM:SS
.relative
to now.