Package org.ocpsoft.prettytime
Interface TimeFormat
- All Known Implementing Classes:
ResourcesTimeFormat,SimpleTimeFormat
public interface TimeFormat
Format a Duration object.
- Author:
- Lincoln Baxter, III
-
Method Summary
Modifier and TypeMethodDescriptionDecorate with past or future prefix/suffix (with rounding)decorateUnrounded(Duration duration, String time) Decorate with past or future prefix/suffix (without rounding)Given a populatedDurationobject.formatUnrounded(Duration duration) Given a populatedDurationobject.
-
Method Details
-
format
Given a populatedDurationobject. Apply formatting (with rounding) and output the result.- Parameters:
The- originalDurationinstance from which the time string should be decorated.
-
formatUnrounded
Given a populatedDurationobject. Apply formatting (without rounding) and output the result.- Parameters:
The- originalDurationinstance from which the time string should be decorated.
-
decorate
Decorate with past or future prefix/suffix (with rounding)- Parameters:
duration- The originalDurationinstance from which the time string should be decorated.time- The formatted time string.
-
decorateUnrounded
Decorate with past or future prefix/suffix (without rounding)- Parameters:
duration- The originalDurationinstance from which the time string should be decorated.time- The formatted time string.
-