|
Expresso 5-5-0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.core.misc.DateTime
| Constructor Summary | |
DateTime()
Constructor |
|
| Method Summary | |
static String |
getDateForDB()
Get a date field formatted for insertion into a database Value of the date is the current date author Yves Henri AMAIZO |
static String |
getDateForDB(Date date)
Get a time field formatted for insertion into a database author Yves Henri AMAIZO |
static String |
getDateForDB(Date date,
String context)
Takes into account for the database context. |
static String |
getDateForDB(int year,
int mon,
int day)
Get a date field formatted for insertion into a database author Yves Henri AMAIZO |
static String |
getDateFormatString(boolean dateOnly,
Locale locale)
Get the Date or DateTime format for a Locale. |
static String |
getDateString()
Return the current date as a formatted string |
static String |
getDateString(Calendar now)
Deprecated. Since Expresso 5.3 This function doesn't take into account database contexts or types of fields. Use getDateTimeForDB(Calendar.getTime()) instead. |
static String |
getDateTimeForDB()
Get a date/time field formatted for insertion into a database Value of the date/time is the current date and time |
static String |
getDateTimeForDB(Date date)
Get a date/time field formatted for insertion into a database (default context) |
static String |
getDateTimeForDB(Date date,
String context)
Get a date/time field formatted for insertion into a database |
static String |
getDateTimeForDB(int year,
int month,
int day,
int hour,
int min,
int sec)
Get a date/time field formatted for insertion into a database Value of the date/time is the current date and time |
static String |
getDateTimeForDB(int year,
int month,
int day,
int hour,
int min,
int sec,
String context)
Get a date/time field formatted for insertion into a database Value of the date/time is the current date and time |
static String |
getDateTimeForDB(String dbContext)
Get a date/time field formatted for insertion into a database Value of the date/time is the current date and time |
static String |
getDateTimeString()
Get a date/time string containing the current date and time, formatted for user readability |
static String |
getDateTimeString(Date date)
Get a date/time string for a given date and time, formatted for user readability |
static String |
getTimeForDB()
Get a time field formatted for insertion into a database Value of the time is the current time |
static String |
getTimeForDB(Date date)
Get a time field formatted for insertion into a database |
static String |
getTimeForDB(Date date,
String context)
Takes into account for the database context. |
static String |
getTimeForDB(int hour,
int min,
int sec)
Get atime field formatted for insertion into a database |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DateTime()
| Method Detail |
public static String getDateString()
public static String getDateTimeForDB()
throws DBException
DBException
public static String getDateTimeForDB(String dbContext)
throws DBException
dbContext - the database context to which to format this for.
DBException
public static String getDateTimeForDB(int year,
int month,
int day,
int hour,
int min,
int sec,
String context)
throws DBException
year - integer yearmonth - integer month valueday - integer day valuehour - integer hour valuemin - integer minutes valuesec - integer seconds valuecontext - the data context to format this date-time string for.
DBException
public static String getDateTimeForDB(Date date,
String context)
throws DBException
date - java.util.Date to format into a string for a databasecontext - the data context to format the string for.
DBExceptionpublic static String getDateString(Calendar now)
now - Calendar Object that is to represent the date/time you wish
to format for
public static String getDateTimeForDB(int year,
int month,
int day,
int hour,
int min,
int sec)
throws DBException
year - integer yearmonth - integer month valueday - integer day valuehour - integer hour valuemin - integer minutes valuesec - integer seconds value
DBException - upon error
public static String getDateTimeForDB(Date date)
throws DBException
date - the java.util.Date object to format for the
database.
DBException
public static String getDateTimeString()
throws DBException
DBException
public static String getDateTimeString(Date date)
throws DBException
date - java.util.Date to format for the default database
DBException - upon error
public static String getTimeForDB()
throws DBException
DBException - upon error
public static String getTimeForDB(int hour,
int min,
int sec)
throws DBException
hour - hours as an intmin - minutes as an intsec - seconds as an int
DBException
public static String getTimeForDB(Date date)
throws DBException
date - the java.util.Date object to format for
the default database
DBException
public static String getTimeForDB(Date date,
String context)
throws DBException
date - the java.util.Date object to format forcontext - the data context to get the formatted string for.
DBException
public static String getDateForDB()
throws DBException
DBException
public static String getDateForDB(int year,
int mon,
int day)
throws DBException
year - The year as an integer. ex: 1999mon - The month as an integer [0-11]day - of month The day of the month [1-31 variable]
DBException
public static String getDateForDB(Date date)
throws DBException
date - The java.util.Date to format
DBException
public static String getDateForDB(Date date,
String context)
throws DBException
date - The java.util.Date to formatcontext - The data context to format for
DBException
public static String getDateFormatString(boolean dateOnly,
Locale locale)
datetime.format.MM = mm datetime.format.dd = dd datetime.format.yy = yyyy
dateOnly - True if this is to get a date only format (m/d/yy) versus DateTime (m/d/yy h:m:s)locale - The locale to get the format for. This may not be null
|
Expresso 5-5-0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||