|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.visad.UtcDate
public final class UtcDate
A set of utility functions for UTC DateTimes
| Field Summary | |
|---|---|
static String |
DEFAULT_PATTERN
Default time format |
static TimeZone |
GMT
GMT Timezone |
static String |
HH_FORMAT
hour format string (HH) |
static String |
HH_MM_FORMAT
hour:minute format string (HH:mm) |
static String |
HMS_FORMAT
hour:minute:second format string (HH:mm:ss) |
static String |
MACRO_TIMESTAMP
timestamp macro identifier |
static String |
YMD_FORMAT
Year-Month-Day format string |
| Constructor Summary | |
|---|---|
UtcDate()
default constructor |
|
| Method Summary | |
|---|---|
static String |
applyTimeMacro(String template,
DateTime dttm)
Apply the timestamp macro to the string |
static String |
applyTimeMacro(String template,
DateTime dttm,
String noTimeLabel)
Apply the timestamp macro to the string |
static boolean |
containsTimeMacro(String s)
See if the string contains a timestamp macro |
static String |
formatUtcDate(DateTime dt,
String pattern)
Return a formated date in UTC time. |
static String |
getHH(DateTime dt)
Get the hour as a String. |
static String |
getHHMM(DateTime dt)
Get the hour:minute as a String. |
static String |
getHMS(DateTime dt)
Get the hour/minute/second as a String |
static String |
getUtcDate(DateTime dt)
Get the full datetime using the DEFAULT_FORMAT |
static String |
getYMD(DateTime dt)
Get the year-month-day as a String |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String MACRO_TIMESTAMP
public static final String YMD_FORMAT
public static final String HMS_FORMAT
public static final String HH_MM_FORMAT
public static final String HH_FORMAT
public static final TimeZone GMT
public static final String DEFAULT_PATTERN
| Constructor Detail |
|---|
public UtcDate()
| Method Detail |
|---|
public static String getHH(DateTime dt)
dt - DateTime to use
public static boolean containsTimeMacro(String s)
s - the string
public static String applyTimeMacro(String template,
DateTime dttm)
template - the timestamp templatedttm - the DateTime
public static String applyTimeMacro(String template,
DateTime dttm,
String noTimeLabel)
template - the timestamp templatedttm - the DateTimenoTimeLabel - the label if dttm is null;
public static String getHHMM(DateTime dt)
dt - DateTime to use
public static String getYMD(DateTime dt)
dt - DateTime to use
public static String getHMS(DateTime dt)
dt - DateTime to use
public static String getUtcDate(DateTime dt)
dt - DateTime to use
public static String formatUtcDate(DateTime dt,
String pattern)
dt - DateTime objectpattern - format pattern
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||