com.atlassian.bitbucket.util.DateFormatter |
Class Overview
Allows the formatting of a date according to predefined formats.
Summary
Nested Classes |
enum |
DateFormatter.FormatType |
A predefined date format. |
Constants
public
static
final
String
PROPERTY_KEY_PREFIX
Constant Value:
"bitbucket.date.format"
Public Methods
@Nonnull
public
String
formatDate
(Date date, DateFormatter.FormatType type)
Parameters
date
| the date to format. |
type
| the type of date rendering to generate. |
@Nonnull
public
String
formatInstant
(Instant instant, DateFormatter.FormatType type)
Format the passed Instant.
Parameters
instant
| the instant to render. |
type
| the type of date rendering to generate. |
Throws
NullPointerException
| if any of the arguments is null. |
@Nullable
public
String
getFormatString
(String key)