git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6798 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2008-01-21 06:11:16 +00:00
1 parent 460c08d445
commit ba77382fe5
4 files changed
+14 -3

No files matched your search

+10
View File
@@ -9,6 +9,7 @@ import org.apache.tools.ant.types.FileSet;
import org.apache.tools.ant.taskdefs.Chmod;
import org.apache.tools.ant.taskdefs.Copy;
import org.kohsuke.stapler.Stapler;
import org.jvnet.localizer.Localizable;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
@@ -365,6 +366,7 @@ public class Util {
/**
* Returns a human readable text of the time duration.
* This version should be used for representing a duration of some activity (like build)
*
* @param duration
* number of milliseconds.
@@ -389,6 +391,14 @@ public class Util {
return Messages.Util_year(duration);
}
/**
* Get a human readable string representing strings like "xxx days ago",
* which should be used to point to the occurence of an event in the past.
*/
public static String getPastTimeString(long duration) {
return Messages.Util_pastTime(getTimeSpanString(duration));
}
/**
* Combines number and unit, with a plural suffix if needed.
*/