|
mhuss utils 1.1.5ws | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mhuss.Util.DateU
public class DateU
A simple set of date and time formatters. This once trivial task got a bit complicated after the addition of i18n support.
Constructor Summary | |
---|---|
DateU()
|
Method Summary | |
---|---|
static java.lang.String |
date(java.util.Date d)
Convert a Date into a date String using the default Locale and the DateFormat.MEDIUM size. |
static java.lang.String |
date(java.util.Date d,
int dateFmt)
Convert a Date into a date String using the default Locale. |
static java.lang.String |
dateNow()
Return 'now' as a date String using the default Locale and the DateFormat.MEDIUM size. |
static java.lang.String |
dateNow(int dateFmt)
Return 'now' as a date String using the default Locale |
static java.lang.String |
dateTime(java.util.Calendar c)
Convert a Calendar into a date and time String using the default Locale and the DateFormat.MEDIUM size. |
static java.lang.String |
dateTime(java.util.Date d)
Convert a Date into a date and time String using the default Locale and the DateFormat.MEDIUM size. |
static java.lang.String |
dateTime(java.util.Date d,
int dtFmt)
Convert a Date into a date and time String using the default Locale |
static java.lang.String |
dateTimeNow()
Return 'now' as a date and time String using the default Locale and the DateFormat.MEDIUM size. |
static java.lang.String |
time(java.util.Date d)
Convert a Date into a time String using the default Locale and the DateFormat.MEDIUM size. |
static java.lang.String |
time(java.util.Date d,
int dateFmt)
Convert a Date into a time String using the default Locale |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DateU()
Method Detail |
---|
public static java.lang.String dateNow(int dateFmt)
dateFmt
- The java.text.DateFormat constant to use
(FULL, LONG, MEDIUM, or
SHORT).
public static java.lang.String dateNow()
public static java.lang.String dateTimeNow()
public static java.lang.String date(java.util.Date d, int dateFmt)
d
- The java.util.Date to convertdateFmt
- The java.text.DateFormat constant to use
(FULL, LONG, MEDIUM, or
SHORT).
public static java.lang.String date(java.util.Date d)
d
- The java.util.Date to convert
public static java.lang.String time(java.util.Date d, int dateFmt)
d
- The java.util.Date to convertdateFmt
- The java.text.DateFormat constant to use
(FULL, LONG, MEDIUM, or
SHORT).
public static java.lang.String time(java.util.Date d)
d
- The java.util.Date to convert
public static java.lang.String dateTime(java.util.Date d, int dtFmt)
d
- The java.util.Date to convertdtFmt
- The java.text.DateFormat constant to use
(FULL, LONG, MEDIUM, or
SHORT).
public static java.lang.String dateTime(java.util.Date d)
d
- The java.util.Date to convert
public static java.lang.String dateTime(java.util.Calendar c)
c
- The java.util.Calendar to convert
|
mhuss utils 1.1.5ws | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |