|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ofbiz.base.util.UtilDateTime
public class UtilDateTime
Utility class for handling java.util.Date, the java.sql data/time classes and related
Field Summary | |
---|---|
protected static java.util.List<java.util.TimeZone> |
availableTimeZoneList
|
static java.lang.String[] |
days
|
static java.text.DecimalFormat |
df
|
static java.lang.String |
fallBackJSPattern
Default pattern that getJsDateTimeFormat can return in case of error or
if given pattern element isn't supported by jscalendar . |
static java.lang.String[] |
months
|
static java.lang.String[][] |
timevals
|
Constructor Summary | |
---|---|
UtilDateTime()
|
Method Summary | |
---|---|
static java.sql.Timestamp |
addDaysToTimestamp(java.sql.Timestamp start,
java.lang.Double days)
|
static java.sql.Timestamp |
addDaysToTimestamp(java.sql.Timestamp start,
int days)
|
static java.sql.Timestamp |
adjustTimestamp(java.sql.Timestamp stamp,
java.lang.Integer adjType,
java.lang.Integer adjQuantity)
|
static java.sql.Timestamp |
adjustTimestamp(java.sql.Timestamp stamp,
int adjType,
int adjQuantity,
java.util.TimeZone timeZone,
java.util.Locale locale)
Perform date/time arithmetic on a Timestamp. |
static java.util.List<java.util.TimeZone> |
availableTimeZones()
Returns a List of available TimeZone objects. |
static int |
dayNumber(java.sql.Timestamp stamp)
returns a day number in a week for a Timestamp input |
static java.lang.String |
formatInterval(java.util.Date from,
java.util.Date thru,
int count,
java.util.Locale locale)
|
static java.lang.String |
formatInterval(java.util.Date from,
java.util.Date thru,
java.util.Locale locale)
|
static java.lang.String |
formatInterval(double interval,
int count,
java.util.Locale locale)
|
static java.lang.String |
formatInterval(double interval,
java.util.Locale locale)
|
static java.lang.String |
formatInterval(long interval,
int count,
java.util.Locale locale)
|
static java.lang.String |
formatInterval(long interval,
java.util.Locale locale)
|
static java.lang.String |
formatInterval(java.sql.Timestamp from,
java.sql.Timestamp thru,
int count,
java.util.Locale locale)
|
static java.lang.String |
formatInterval(java.sql.Timestamp from,
java.sql.Timestamp thru,
java.util.Locale locale)
|
static java.lang.String |
getDateFormat(java.util.Locale locale)
Returns appropriate date format string. |
static java.lang.String |
getDateTimeFormat(java.util.Locale locale)
Returns appropriate date + time format string. |
static java.sql.Timestamp |
getDayEnd(java.sql.Timestamp stamp)
|
static java.sql.Timestamp |
getDayEnd(java.sql.Timestamp stamp,
java.lang.Long daysLater)
|
static java.sql.Timestamp |
getDayEnd(java.sql.Timestamp stamp,
java.lang.Long daysLater,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static java.sql.Timestamp |
getDayEnd(java.sql.Timestamp stamp,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static java.util.List<java.lang.String> |
getDayNames(java.util.Locale locale)
Returns a List of day name Strings - suitable for calendar headings. |
static int |
getDayOfMonth(java.sql.Timestamp stamp,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static int |
getDayOfWeek(java.sql.Timestamp stamp,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static int |
getDayOfYear(java.sql.Timestamp stamp,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static java.sql.Timestamp |
getDayStart(java.sql.Timestamp stamp)
|
static java.sql.Timestamp |
getDayStart(java.sql.Timestamp stamp,
int daysLater)
|
static java.sql.Timestamp |
getDayStart(java.sql.Timestamp stamp,
int daysLater,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static java.sql.Timestamp |
getDayStart(java.sql.Timestamp stamp,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static int |
getHour(java.sql.Timestamp stamp,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static double |
getInterval(java.util.Date from,
java.util.Date thru)
|
static double |
getInterval(java.sql.Timestamp from,
java.sql.Timestamp thru)
|
static int |
getIntervalInDays(java.sql.Timestamp from,
java.sql.Timestamp thru)
|
static java.lang.String |
getJsDateTimeFormat(java.lang.String pattern)
Method converts given date/time pattern in SimpleDateFormat style to form that can be used by jscalendar. Called from FTL and form widget rendering code for setup calendar. |
static int |
getMinute(java.sql.Timestamp stamp,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static int |
getMonth(java.sql.Timestamp stamp,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static java.sql.Timestamp |
getMonthEnd(java.sql.Timestamp stamp,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static java.util.List<java.lang.String> |
getMonthNames(java.util.Locale locale)
Returns a List of month name Strings - suitable for calendar headings. |
static java.sql.Timestamp |
getMonthStart(java.sql.Timestamp stamp)
Return the date for the first day of the month |
static java.sql.Timestamp |
getMonthStart(java.sql.Timestamp stamp,
int daysLater)
|
static java.sql.Timestamp |
getMonthStart(java.sql.Timestamp stamp,
int daysLater,
int monthsLater)
|
static java.sql.Timestamp |
getMonthStart(java.sql.Timestamp stamp,
int daysLater,
int monthsLater,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static java.sql.Timestamp |
getMonthStart(java.sql.Timestamp stamp,
int daysLater,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static java.sql.Timestamp |
getMonthStart(java.sql.Timestamp stamp,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static java.sql.Timestamp |
getNextDayStart(java.sql.Timestamp stamp)
|
static int |
getSecond(java.sql.Timestamp stamp,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static java.lang.String |
getTimeFormat(java.util.Locale locale)
Returns appropriate time format string. |
static java.sql.Timestamp |
getTimestamp(long time)
Convert a millisecond value to a Timestamp. |
static java.sql.Timestamp |
getTimestamp(java.lang.String milliSecs)
Convert a millisecond value to a Timestamp. |
static int |
getWeek(java.sql.Timestamp stamp,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static java.sql.Timestamp |
getWeekEnd(java.sql.Timestamp stamp)
|
static java.sql.Timestamp |
getWeekEnd(java.sql.Timestamp stamp,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static java.sql.Timestamp |
getWeekStart(java.sql.Timestamp stamp)
Return the date for the first day of the week |
static java.sql.Timestamp |
getWeekStart(java.sql.Timestamp stamp,
int daysLater)
|
static java.sql.Timestamp |
getWeekStart(java.sql.Timestamp stamp,
int daysLater,
int weeksLater)
|
static java.sql.Timestamp |
getWeekStart(java.sql.Timestamp stamp,
int daysLater,
int weeksLater,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static java.sql.Timestamp |
getWeekStart(java.sql.Timestamp stamp,
int daysLater,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static java.sql.Timestamp |
getWeekStart(java.sql.Timestamp stamp,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static int |
getYear(java.sql.Timestamp stamp,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static java.sql.Timestamp |
getYearEnd(java.sql.Timestamp stamp,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static java.sql.Timestamp |
getYearStart(java.sql.Timestamp stamp)
Return the date for the first day of the year |
static java.sql.Timestamp |
getYearStart(java.sql.Timestamp stamp,
int daysLater)
|
static java.sql.Timestamp |
getYearStart(java.sql.Timestamp stamp,
int daysLater,
int yearsLater)
|
static java.sql.Timestamp |
getYearStart(java.sql.Timestamp stamp,
int daysLater,
int monthsLater,
int yearsLater)
|
static java.sql.Timestamp |
getYearStart(java.sql.Timestamp stamp,
int daysLater,
int monthsLater,
int yearsLater,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static java.sql.Timestamp |
getYearStart(java.sql.Timestamp stamp,
int daysLater,
int yearsLater,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static java.sql.Timestamp |
getYearStart(java.sql.Timestamp stamp,
int daysLater,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static java.sql.Timestamp |
getYearStart(java.sql.Timestamp stamp,
java.lang.Number daysLater,
java.lang.Number monthsLater,
java.lang.Number yearsLater)
|
static java.sql.Timestamp |
getYearStart(java.sql.Timestamp stamp,
java.lang.Number daysLater,
java.lang.Number monthsLater,
java.lang.Number yearsLater,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static java.sql.Timestamp |
getYearStart(java.sql.Timestamp stamp,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
static java.sql.Timestamp |
monthBegin()
Makes a Timestamp for the beginning of the month |
static java.lang.String |
nowAsString()
Returns currentTimeMillis as String |
static java.util.Date |
nowDate()
Return a Date for right now |
static java.lang.String |
nowDateString()
Return a string formatted as yyyyMMddHHmmss |
static java.lang.String |
nowDateString(java.lang.String format)
Return a string formatted as format |
static java.sql.Timestamp |
nowTimestamp()
Return a Timestamp for right now |
static java.sql.Timestamp |
stringToTimeStamp(java.lang.String dateTimeString,
java.lang.String dateTimeFormat,
java.util.TimeZone tz,
java.util.Locale locale)
Localized String to Timestamp conversion. |
static java.sql.Timestamp |
stringToTimeStamp(java.lang.String dateTimeString,
java.util.TimeZone tz,
java.util.Locale locale)
Localized String to Timestamp conversion. |
static java.lang.String |
timeStampToString(java.sql.Timestamp stamp,
java.lang.String dateTimeFormat,
java.util.TimeZone tz,
java.util.Locale locale)
Localized Timestamp to String conversion. |
static java.lang.String |
timeStampToString(java.sql.Timestamp stamp,
java.util.TimeZone tz,
java.util.Locale locale)
Localized Timestamp to String conversion. |
static java.util.Calendar |
toCalendar(java.util.Date date,
java.util.TimeZone timeZone,
java.util.Locale locale)
Returns a Calendar object initialized to the specified date/time, time zone, and locale. |
static java.util.Calendar |
toCalendar(java.sql.Timestamp stamp)
|
static java.util.Date |
toDate(int month,
int day,
int year,
int hour,
int minute,
int second)
Makes a Date from separate ints for month, day, year, hour, minute, and second. |
static java.util.Date |
toDate(java.lang.String dateTime)
Converts a date and time String into a Date |
static java.util.Date |
toDate(java.lang.String date,
java.lang.String time)
Converts a date String and a time String into a Date |
static java.util.Date |
toDate(java.lang.String monthStr,
java.lang.String dayStr,
java.lang.String yearStr,
java.lang.String hourStr,
java.lang.String minuteStr,
java.lang.String secondStr)
Makes a Date from separate Strings for month, day, year, hour, minute, and second. |
static java.text.DateFormat |
toDateFormat(java.lang.String dateFormat,
java.util.TimeZone tz,
java.util.Locale locale)
Returns an initialized DateFormat object. |
static java.lang.String |
toDateString(java.util.Date date)
Makes a date String in the format MM/DD/YYYY from a Date |
static java.lang.String |
toDateString(java.util.Date date,
java.lang.String format)
Makes a date String in the given from a Date |
static java.text.DateFormat |
toDateTimeFormat(java.lang.String dateTimeFormat,
java.util.TimeZone tz,
java.util.Locale locale)
Returns an initialized DateFormat object. |
static java.lang.String |
toDateTimeString(java.util.Date date)
Makes a combined data and time string in the format "MM/DD/YYYY HH:MM:SS" from a Date. |
static java.lang.String |
toGmtTimestampString(java.sql.Timestamp timestamp)
|
static java.sql.Date |
toSqlDate(int month,
int day,
int year)
Makes a java.sql.Date from separate ints for month, day, year |
static java.sql.Date |
toSqlDate(java.lang.String date)
Converts a date String into a java.sql.Date |
static java.sql.Date |
toSqlDate(java.lang.String monthStr,
java.lang.String dayStr,
java.lang.String yearStr)
Makes a java.sql.Date from separate Strings for month, day, year |
static java.sql.Time |
toSqlTime(int hour,
int minute,
int second)
Makes a java.sql.Time from separate ints for hour, minute, and second. |
static java.sql.Time |
toSqlTime(java.lang.String time)
Converts a time String into a java.sql.Time |
static java.sql.Time |
toSqlTime(java.lang.String hourStr,
java.lang.String minuteStr,
java.lang.String secondStr)
Makes a java.sql.Time from separate Strings for hour, minute, and second. |
static java.text.DateFormat |
toTimeFormat(java.lang.String timeFormat,
java.util.TimeZone tz,
java.util.Locale locale)
Returns an initialized DateFormat object. |
static java.sql.Timestamp |
toTimestamp(java.util.Date date)
|
static java.sql.Timestamp |
toTimestamp(int month,
int day,
int year,
int hour,
int minute,
int second)
Makes a Timestamp from separate ints for month, day, year, hour, minute, and second. |
static java.sql.Timestamp |
toTimestamp(java.lang.String dateTime)
Converts a date and time String into a Timestamp |
static java.sql.Timestamp |
toTimestamp(java.lang.String date,
java.lang.String time)
Converts a date String and a time String into a Timestamp |
static java.sql.Timestamp |
toTimestamp(java.lang.String monthStr,
java.lang.String dayStr,
java.lang.String yearStr,
java.lang.String hourStr,
java.lang.String minuteStr,
java.lang.String secondStr)
Makes a Timestamp from separate Strings for month, day, year, hour, minute, and second. |
static java.lang.String |
toTimeString(java.util.Date date)
Makes a time String in the format HH:MM:SS from a Date. |
static java.lang.String |
toTimeString(int hour,
int minute,
int second)
Makes a time String in the format HH:MM:SS from a separate ints for hour, minute, and second. |
static java.util.TimeZone |
toTimeZone(int gmtOffset)
Returns a TimeZone object based upon an hour offset from GMT. |
static java.util.TimeZone |
toTimeZone(java.lang.String tzId)
Returns a TimeZone object based upon a time zone ID. |
static int |
weekNumber(java.sql.Timestamp input)
returns a week number in a year for a Timestamp input |
static int |
weekNumber(java.sql.Timestamp input,
int startOfWeek)
|
static int |
weekNumber(java.sql.Timestamp stamp,
java.util.TimeZone timeZone,
java.util.Locale locale)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String[] months
public static final java.lang.String[] days
public static final java.lang.String[][] timevals
public static final java.text.DecimalFormat df
protected static java.util.List<java.util.TimeZone> availableTimeZoneList
public static final java.lang.String fallBackJSPattern
getJsDateTimeFormat
can return in case of error or
if given pattern element isn't supported by jscalendar .
Constructor Detail |
---|
public UtilDateTime()
Method Detail |
---|
public static double getInterval(java.util.Date from, java.util.Date thru)
public static int getIntervalInDays(java.sql.Timestamp from, java.sql.Timestamp thru)
public static java.sql.Timestamp addDaysToTimestamp(java.sql.Timestamp start, int days)
public static java.sql.Timestamp addDaysToTimestamp(java.sql.Timestamp start, java.lang.Double days)
public static double getInterval(java.sql.Timestamp from, java.sql.Timestamp thru)
public static java.lang.String formatInterval(java.util.Date from, java.util.Date thru, int count, java.util.Locale locale)
public static java.lang.String formatInterval(java.util.Date from, java.util.Date thru, java.util.Locale locale)
public static java.lang.String formatInterval(java.sql.Timestamp from, java.sql.Timestamp thru, int count, java.util.Locale locale)
public static java.lang.String formatInterval(java.sql.Timestamp from, java.sql.Timestamp thru, java.util.Locale locale)
public static java.lang.String formatInterval(long interval, int count, java.util.Locale locale)
public static java.lang.String formatInterval(long interval, java.util.Locale locale)
public static java.lang.String formatInterval(double interval, java.util.Locale locale)
public static java.lang.String formatInterval(double interval, int count, java.util.Locale locale)
public static java.sql.Timestamp nowTimestamp()
public static java.sql.Timestamp getTimestamp(long time)
time
- millsecond value
public static java.sql.Timestamp getTimestamp(java.lang.String milliSecs) throws java.lang.NumberFormatException
milliSecs
- millsecond value
java.lang.NumberFormatException
public static java.lang.String nowAsString()
public static java.lang.String nowDateString()
public static java.lang.String nowDateString(java.lang.String format)
public static java.util.Date nowDate()
public static java.sql.Timestamp getDayStart(java.sql.Timestamp stamp)
public static java.sql.Timestamp getDayStart(java.sql.Timestamp stamp, int daysLater)
public static java.sql.Timestamp getNextDayStart(java.sql.Timestamp stamp)
public static java.sql.Timestamp getDayEnd(java.sql.Timestamp stamp)
public static java.sql.Timestamp getDayEnd(java.sql.Timestamp stamp, java.lang.Long daysLater)
public static java.sql.Timestamp getYearStart(java.sql.Timestamp stamp)
stamp
-
public static java.sql.Timestamp getYearStart(java.sql.Timestamp stamp, int daysLater)
public static java.sql.Timestamp getYearStart(java.sql.Timestamp stamp, int daysLater, int yearsLater)
public static java.sql.Timestamp getYearStart(java.sql.Timestamp stamp, int daysLater, int monthsLater, int yearsLater)
public static java.sql.Timestamp getYearStart(java.sql.Timestamp stamp, java.lang.Number daysLater, java.lang.Number monthsLater, java.lang.Number yearsLater)
public static java.sql.Timestamp getMonthStart(java.sql.Timestamp stamp)
stamp
-
public static java.sql.Timestamp getMonthStart(java.sql.Timestamp stamp, int daysLater)
public static java.sql.Timestamp getMonthStart(java.sql.Timestamp stamp, int daysLater, int monthsLater)
public static java.sql.Timestamp getWeekStart(java.sql.Timestamp stamp)
stamp
-
public static java.sql.Timestamp getWeekStart(java.sql.Timestamp stamp, int daysLater)
public static java.sql.Timestamp getWeekStart(java.sql.Timestamp stamp, int daysLater, int weeksLater)
public static java.sql.Timestamp getWeekEnd(java.sql.Timestamp stamp)
public static java.util.Calendar toCalendar(java.sql.Timestamp stamp)
public static java.sql.Date toSqlDate(java.lang.String date)
date
- The date String: MM/DD/YYYY
public static java.sql.Date toSqlDate(java.lang.String monthStr, java.lang.String dayStr, java.lang.String yearStr)
monthStr
- The month StringdayStr
- The day StringyearStr
- The year String
public static java.sql.Date toSqlDate(int month, int day, int year)
month
- The month intday
- The day intyear
- The year int
public static java.sql.Time toSqlTime(java.lang.String time)
time
- The time String: either HH:MM or HH:MM:SS
public static java.sql.Time toSqlTime(java.lang.String hourStr, java.lang.String minuteStr, java.lang.String secondStr)
hourStr
- The hour StringminuteStr
- The minute StringsecondStr
- The second String
public static java.sql.Time toSqlTime(int hour, int minute, int second)
hour
- The hour intminute
- The minute intsecond
- The second int
public static java.sql.Timestamp toTimestamp(java.lang.String dateTime)
dateTime
- A combined data and time string in the format "MM/DD/YYYY HH:MM:SS", the seconds are optional
public static java.sql.Timestamp toTimestamp(java.lang.String date, java.lang.String time)
date
- The date String: MM/DD/YYYYtime
- The time String: either HH:MM or HH:MM:SS
public static java.sql.Timestamp toTimestamp(java.lang.String monthStr, java.lang.String dayStr, java.lang.String yearStr, java.lang.String hourStr, java.lang.String minuteStr, java.lang.String secondStr)
monthStr
- The month StringdayStr
- The day StringyearStr
- The year StringhourStr
- The hour StringminuteStr
- The minute StringsecondStr
- The second String
public static java.sql.Timestamp toTimestamp(int month, int day, int year, int hour, int minute, int second)
month
- The month intday
- The day intyear
- The year inthour
- The hour intminute
- The minute intsecond
- The second int
public static java.sql.Timestamp toTimestamp(java.util.Date date)
public static java.util.Date toDate(java.lang.String dateTime)
dateTime
- A combined data and time string in the format "MM/DD/YYYY HH:MM:SS", the seconds are optional
public static java.util.Date toDate(java.lang.String date, java.lang.String time)
date
- The date String: MM/DD/YYYYtime
- The time String: either HH:MM or HH:MM:SS
public static java.util.Date toDate(java.lang.String monthStr, java.lang.String dayStr, java.lang.String yearStr, java.lang.String hourStr, java.lang.String minuteStr, java.lang.String secondStr)
monthStr
- The month StringdayStr
- The day StringyearStr
- The year StringhourStr
- The hour StringminuteStr
- The minute StringsecondStr
- The second String
public static java.util.Date toDate(int month, int day, int year, int hour, int minute, int second)
month
- The month intday
- The day intyear
- The year inthour
- The hour intminute
- The minute intsecond
- The second int
public static java.lang.String toDateString(java.util.Date date, java.lang.String format)
date
- The Date
public static java.lang.String toDateString(java.util.Date date)
date
- The Date
public static java.lang.String toTimeString(java.util.Date date)
date
- The Date
public static java.lang.String toTimeString(int hour, int minute, int second)
hour
- The hour intminute
- The minute intsecond
- The second int
public static java.lang.String toDateTimeString(java.util.Date date)
date
- The Date
public static java.lang.String toGmtTimestampString(java.sql.Timestamp timestamp)
public static java.sql.Timestamp monthBegin()
public static int weekNumber(java.sql.Timestamp input)
input
- Timestamp date
public static int dayNumber(java.sql.Timestamp stamp)
stamp
- Timestamp date
public static int weekNumber(java.sql.Timestamp input, int startOfWeek)
public static java.util.Calendar toCalendar(java.util.Date date, java.util.TimeZone timeZone, java.util.Locale locale)
date
- date/time to usetimeZone
- locale
-
Calendar
public static java.sql.Timestamp adjustTimestamp(java.sql.Timestamp stamp, int adjType, int adjQuantity, java.util.TimeZone timeZone, java.util.Locale locale)
stamp
- date/time to perform arithmetic onadjType
- the adjustment type to perform. Use one of the java.util.Calendar fields.adjQuantity
- the adjustment quantity.timeZone
- locale
-
Calendar
public static java.sql.Timestamp adjustTimestamp(java.sql.Timestamp stamp, java.lang.Integer adjType, java.lang.Integer adjQuantity)
public static java.sql.Timestamp getDayStart(java.sql.Timestamp stamp, java.util.TimeZone timeZone, java.util.Locale locale)
public static java.sql.Timestamp getDayStart(java.sql.Timestamp stamp, int daysLater, java.util.TimeZone timeZone, java.util.Locale locale)
public static java.sql.Timestamp getDayEnd(java.sql.Timestamp stamp, java.util.TimeZone timeZone, java.util.Locale locale)
public static java.sql.Timestamp getDayEnd(java.sql.Timestamp stamp, java.lang.Long daysLater, java.util.TimeZone timeZone, java.util.Locale locale)
public static java.sql.Timestamp getWeekStart(java.sql.Timestamp stamp, java.util.TimeZone timeZone, java.util.Locale locale)
public static java.sql.Timestamp getWeekStart(java.sql.Timestamp stamp, int daysLater, java.util.TimeZone timeZone, java.util.Locale locale)
public static java.sql.Timestamp getWeekStart(java.sql.Timestamp stamp, int daysLater, int weeksLater, java.util.TimeZone timeZone, java.util.Locale locale)
public static java.sql.Timestamp getWeekEnd(java.sql.Timestamp stamp, java.util.TimeZone timeZone, java.util.Locale locale)
public static java.sql.Timestamp getMonthStart(java.sql.Timestamp stamp, java.util.TimeZone timeZone, java.util.Locale locale)
public static java.sql.Timestamp getMonthStart(java.sql.Timestamp stamp, int daysLater, java.util.TimeZone timeZone, java.util.Locale locale)
public static java.sql.Timestamp getMonthStart(java.sql.Timestamp stamp, int daysLater, int monthsLater, java.util.TimeZone timeZone, java.util.Locale locale)
public static java.sql.Timestamp getMonthEnd(java.sql.Timestamp stamp, java.util.TimeZone timeZone, java.util.Locale locale)
public static java.sql.Timestamp getYearStart(java.sql.Timestamp stamp, java.util.TimeZone timeZone, java.util.Locale locale)
public static java.sql.Timestamp getYearStart(java.sql.Timestamp stamp, int daysLater, java.util.TimeZone timeZone, java.util.Locale locale)
public static java.sql.Timestamp getYearStart(java.sql.Timestamp stamp, int daysLater, int yearsLater, java.util.TimeZone timeZone, java.util.Locale locale)
public static java.sql.Timestamp getYearStart(java.sql.Timestamp stamp, java.lang.Number daysLater, java.lang.Number monthsLater, java.lang.Number yearsLater, java.util.TimeZone timeZone, java.util.Locale locale)
public static java.sql.Timestamp getYearStart(java.sql.Timestamp stamp, int daysLater, int monthsLater, int yearsLater, java.util.TimeZone timeZone, java.util.Locale locale)
public static java.sql.Timestamp getYearEnd(java.sql.Timestamp stamp, java.util.TimeZone timeZone, java.util.Locale locale)
public static int weekNumber(java.sql.Timestamp stamp, java.util.TimeZone timeZone, java.util.Locale locale)
public static java.util.List<java.lang.String> getDayNames(java.util.Locale locale)
locale
-
public static java.util.List<java.lang.String> getMonthNames(java.util.Locale locale)
locale
-
public static java.text.DateFormat toDateFormat(java.lang.String dateFormat, java.util.TimeZone tz, java.util.Locale locale)
dateFormat
- optional format stringtz
- locale
- can be null if dateFormat is not null
public static java.text.DateFormat toDateTimeFormat(java.lang.String dateTimeFormat, java.util.TimeZone tz, java.util.Locale locale)
dateTimeFormat
- optional format stringtz
- locale
- can be null if dateTimeFormat is not null
public static java.text.DateFormat toTimeFormat(java.lang.String timeFormat, java.util.TimeZone tz, java.util.Locale locale)
timeFormat
- optional format stringtz
- locale
- can be null if timeFormat is not null
public static java.sql.Timestamp stringToTimeStamp(java.lang.String dateTimeString, java.util.TimeZone tz, java.util.Locale locale) throws java.text.ParseException
java.text.ParseException
public static java.sql.Timestamp stringToTimeStamp(java.lang.String dateTimeString, java.lang.String dateTimeFormat, java.util.TimeZone tz, java.util.Locale locale) throws java.text.ParseException
java.text.ParseException
public static java.lang.String timeStampToString(java.sql.Timestamp stamp, java.util.TimeZone tz, java.util.Locale locale)
public static java.lang.String timeStampToString(java.sql.Timestamp stamp, java.lang.String dateTimeFormat, java.util.TimeZone tz, java.util.Locale locale)
public static java.util.List<java.util.TimeZone> availableTimeZones()
TimeZone
public static java.util.TimeZone toTimeZone(java.lang.String tzId)
TimeZone
public static java.util.TimeZone toTimeZone(int gmtOffset)
TimeZone
public static int getSecond(java.sql.Timestamp stamp, java.util.TimeZone timeZone, java.util.Locale locale)
public static int getMinute(java.sql.Timestamp stamp, java.util.TimeZone timeZone, java.util.Locale locale)
public static int getHour(java.sql.Timestamp stamp, java.util.TimeZone timeZone, java.util.Locale locale)
public static int getDayOfWeek(java.sql.Timestamp stamp, java.util.TimeZone timeZone, java.util.Locale locale)
public static int getDayOfMonth(java.sql.Timestamp stamp, java.util.TimeZone timeZone, java.util.Locale locale)
public static int getDayOfYear(java.sql.Timestamp stamp, java.util.TimeZone timeZone, java.util.Locale locale)
public static int getWeek(java.sql.Timestamp stamp, java.util.TimeZone timeZone, java.util.Locale locale)
public static int getMonth(java.sql.Timestamp stamp, java.util.TimeZone timeZone, java.util.Locale locale)
public static int getYear(java.sql.Timestamp stamp, java.util.TimeZone timeZone, java.util.Locale locale)
public static java.lang.String getTimeFormat(java.util.Locale locale)
locale
- User's locale, may be null
public static java.lang.String getDateTimeFormat(java.util.Locale locale)
locale
- User's locale, may be null
.
public static java.lang.String getDateFormat(java.util.Locale locale)
locale
- User's locale, may be null
public static java.lang.String getJsDateTimeFormat(java.lang.String pattern)
pattern
- Pattern to convert. Results of getDate[Time]Format(locale)
as a rule.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |