Package com.atlassian.bitbucket.util
Interface DateFormatter
public interface DateFormatter
Allows the formatting of a date according to predefined formats.
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
A predefined date format. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionformatDate
(Date date, DateFormatter.FormatType type) Format the passed date.formatInstant
(Instant instant, DateFormatter.FormatType type) Format the passedInstant
.getFormatString
(String key)
-
Field Details
-
PROPERTY_KEY_PREFIX
- See Also:
-
-
Method Details
-
formatDate
Format the passed date.- Parameters:
date
- the date to format.type
- the type of date rendering to generate.- Returns:
- the formatted date.
-
formatInstant
Format the passedInstant
.- Parameters:
instant
- the instant to render.type
- the type of date rendering to generate.- Returns:
- the formatted instant.
- Throws:
NullPointerException
- if any of the arguments is null.- Since:
- 4.5
-
getFormatString
-