|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.aiyc.framework.utils.DateUtil
public class DateUtil
Date Utility Class This is used to convert Strings to Dates and Timestamps
| 构造方法摘要 | |
|---|---|
DateUtil()
|
|
| 方法摘要 | |
|---|---|
static String |
convertDateToString(Date aDate)
This method generates a string representation of a date based on the System Property 'dateFormat' in the format you specify on input |
static Date |
convertStringToDate(String strDate)
This method converts a String to a date using the datePattern |
static Date |
convertStringToDate(String aMask,
String strDate)
This method generates a string representation of a date/time in the format you specify on input |
static String |
DateTimeToISOStr(Date date)
|
static String |
DateTimeToStr(Date date)
|
static String |
DateTimeToStr(Date date,
char c)
|
static String |
DateTimeToStr(Date date,
char c,
char c1,
char c2)
|
static String |
getDate(Date aDate)
This method attempts to convert an Oracle-formatted date in the form dd-MMM-yyyy to mm/dd/yyyy. |
static String |
getDatePattern()
Return default datePattern (yyyy-MM-dd) |
static String |
getDateTime(String aMask,
Date aDate)
This method generates a string representation of a date's date/time in the format you specify on input |
static String |
getDateTimePattern()
|
static String |
getTimeNow(Date theTime)
This method returns the current date time in the format: MM/dd/yyyy HH:MM a |
static Calendar |
getToday()
This method returns the current date in the format: MM/dd/yyyy |
static Date |
StrToDate(String s)
|
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public DateUtil()
| 方法详细信息 |
|---|
public static Date StrToDate(String s)
public static String DateTimeToStr(Date date)
public static String DateTimeToISOStr(Date date)
public static String DateTimeToStr(Date date,
char c,
char c1,
char c2)
public static String DateTimeToStr(Date date,
char c)
public static String getDatePattern()
public static String getDateTimePattern()
public static final String getDate(Date aDate)
aDate - date from database as a string
public static final Date convertStringToDate(String aMask,
String strDate)
throws ParseException
aMask - the date pattern the string is instrDate - a string representation of a date
ParseExceptionSimpleDateFormatpublic static String getTimeNow(Date theTime)
theTime - the current time
public static Calendar getToday()
throws ParseException
ParseException
public static final String getDateTime(String aMask,
Date aDate)
aMask - the date pattern the string is inaDate - a date object
SimpleDateFormatpublic static final String convertDateToString(Date aDate)
aDate - A date to convert
public static Date convertStringToDate(String strDate)
throws ParseException
strDate - the date to convert (in format MM/dd/yyyy)
ParseException
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||