org.eclipse.jgit.util
Class RelativeDateFormatter
java.lang.Object
org.eclipse.jgit.util.RelativeDateFormatter
public class RelativeDateFormatter
- extends Object
Formatter to format timestamps relative to the current time using time units
in the format defined by git log --relative-date
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RelativeDateFormatter
public RelativeDateFormatter()
format
public static String format(Date when)
- Parameters:
when
- Date
to format
- Returns:
- age of given
Date
compared to now formatted in the same
relative format as returned by git log --relative-date
Copyright © 2013. All Rights Reserved.