public class RelativeTimeFormatter extends java.lang.Object implements TimeFormatter
TimeFormatter
implementation referred to
SMPP Protocol Specification v3.4 point 7.1.1.Constructor and Description |
---|
RelativeTimeFormatter()
Construct with default timezone.
|
RelativeTimeFormatter(java.util.TimeZone timezone)
Construct with specified SMSC timezone.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
format(java.util.Calendar calendar)
Format the date to
String representation. |
java.lang.String |
format(java.util.Date date)
Format the date to
String representation. |
static java.lang.String |
format(java.lang.Integer year,
java.lang.Integer month,
java.lang.Integer day,
java.lang.Integer hour,
java.lang.Integer minute,
java.lang.Integer second) |
public RelativeTimeFormatter()
public RelativeTimeFormatter(java.util.TimeZone timezone)
timezone
- is the SMSC timezone.public java.lang.String format(java.util.Calendar calendar)
TimeFormatter
String
representation.format
in interface TimeFormatter
calendar
- is the calendar to format.null
if the date
is null
.public java.lang.String format(java.util.Date date)
TimeFormatter
String
representation.format
in interface TimeFormatter
date
- is the date to format.null
if the date
is null
.public static final java.lang.String format(java.lang.Integer year, java.lang.Integer month, java.lang.Integer day, java.lang.Integer hour, java.lang.Integer minute, java.lang.Integer second)