public class RelativeTimeFormatter extends 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(TimeZone timezone)
Construct with specified SMSC timezone.
|
Modifier and Type | Method and Description |
---|---|
String |
format(Calendar calendar)
Format the date to
String representation. |
String |
format(Date date)
Format the date to
String representation. |
static String |
format(Integer year,
Integer month,
Integer day,
Integer hour,
Integer minute,
Integer second) |
public RelativeTimeFormatter()
public RelativeTimeFormatter(TimeZone timezone)
timezone
- is the SMSC timezone.public String format(Calendar calendar)
TimeFormatter
String
representation.format
in interface TimeFormatter
calendar
- is the calendar to format.null
if the date
is null
.public String format(Date date)
TimeFormatter
String
representation.format
in interface TimeFormatter
date
- is the date to format.null
if the date
is null
.