|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.jpattern.core.util.DateHelper
public abstract class DateHelper
| Constructor Summary | |
|---|---|
DateHelper()
|
|
| Method Summary | |
|---|---|
static int |
getDay(Date date)
|
static int |
getDayOfWeek(Date date)
|
static int |
getHour(Date date)
|
static int |
getMilliseconds(Date date)
|
static int |
getMinutes(Date date)
|
static int |
getMonth(Date date)
|
static int |
getSeconds(Date date)
|
static int |
getYear(Date date)
|
static Calendar |
toCalendar(Date date)
|
static Date |
toDate(String d)
Trasforma una stringa secondo il formato dd/mm/yyyy in data. |
static Date |
toDate(String d,
String format)
Trasforma un string in data in base al formato passato |
static Date |
toDate(String d,
String format,
Locale locale)
Trasforma una stringa in data; utilizzando il formato corretto e il locale se il formato risulta locale-sensitive. |
static String |
toString(Date d)
Trasforma una data in stringa secondo il formato dd/mm/yyyy |
static String |
toString(Date d,
String format)
Trasforma una data in stringa in base al formato passato |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DateHelper()
| Method Detail |
|---|
public static Date toDate(String d)
throws Exception
d - String
Exception
public static Date toDate(String d,
String format)
throws Exception
d - Stringformat - String
Exception
public static Date toDate(String d,
String format,
Locale locale)
throws Exception
Trasforma una stringa in data; utilizzando il formato corretto e il locale se il formato risulta locale-sensitive.
Example: String data = "Fri Dec 01 20:24:35 CET 2006"; String format = "EEE MMM dd HH:mm:ss 'CET' yyyy"; Locale locale = Locale.US;
d - Stringformat - Stringlocale - Locale
Exceptionpublic static String toString(Date d)
d - Date
public static String toString(Date d,
String format)
d - Dateformat - String
public static Calendar toCalendar(Date date)
public static int getYear(Date date)
date -
public static int getMonth(Date date)
date -
public static int getDay(Date date)
date -
public static int getDayOfWeek(Date date)
date -
public static int getHour(Date date)
date -
public static int getMinutes(Date date)
date -
public static int getSeconds(Date date)
date -
public static int getMilliseconds(Date date)
date -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||