public class DateSelectorUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
DAY |
static int |
DAYOFMONTH |
static int |
MONTH |
static int |
WEEK |
Constructor and Description |
---|
DateSelectorUtil() |
Modifier and Type | Method and Description |
---|---|
static java.util.Date |
convertDateToClientDate(java.util.Date d,
java.util.Locale l,
java.util.TimeZone tz) |
static com.ibm.icu.util.Calendar |
getCalAfterSetPattern(java.util.Locale l,
java.util.TimeZone tz,
java.util.Date d,
java.lang.String[] str,
int repeatValue,
java.lang.String timeUnit)
creates a calendar with pattern
|
static com.ibm.icu.util.Calendar |
getCalendarForPattern(java.lang.String d,
int day,
int month,
java.util.Locale l,
java.util.TimeZone tz,
int type) |
static com.ibm.icu.util.Calendar |
getCalendarForPattern(java.lang.String d,
int day,
int month,
java.util.Locale l,
java.util.TimeZone tz,
java.util.Locale clientl,
java.util.TimeZone clienttz,
int type) |
long |
getDifference()
returns the difference from the DateSelectorUtil object
|
static int |
getDOMAsInt(java.lang.String domStr)
Converts days of month to int to store in the pattern
|
static java.lang.String[] |
getIndividualString(java.lang.String pattern)
Get the individual string from the pattern.
|
static int |
getMonthAsInt(java.util.Locale l,
java.lang.String month)
Converts month to int to store in the pattern
|
static com.ibm.icu.util.Calendar |
getNextCalendar(com.ibm.icu.util.Calendar c,
java.lang.String[] str,
int repeatValue,
java.lang.String timeUnit)
sets the calendar with the next scheduled date
|
static java.util.Date |
getNextPreviewDate(java.util.Locale l,
java.util.TimeZone tz,
java.util.Date d,
DateSelectorUtil ds)
Get difference in millisecond
|
static java.util.Vector |
getPreviewDates(java.util.Date startDate,
java.util.Date endDate,
java.lang.String pattern)
method to calculate preview dates between start and end date
|
static java.util.Vector<java.util.Date> |
getPreviewDates(java.util.Locale l,
java.util.TimeZone tz,
java.util.Date startDate,
java.util.Date endDate,
java.lang.String pattern)
method to calculate preview dates between start and end date
|
static java.util.Vector<java.util.Date> |
getPreviewDatesInClientPattern(java.util.Locale l,
java.util.TimeZone tz,
java.util.Date startDate,
java.util.Date endDate,
java.lang.String pattern)
Get preview dates with pattern as shown in Date selector UI, i.e it
doesn't change with respect to server locale and timezone
|
static java.util.Vector<java.util.Date> |
getPreviewDatesInServerTimeZone(java.util.Date startDate,
java.util.Date endDate,
java.lang.String pattern)
Return date for displaying preview dates in UI
|
static long |
getSleepingTimeInMilliSecond(java.util.Date nextScheduled,
java.util.Date d)
Get difference in millisecond
|
static long |
getSleepingTimeInMilliSecond(DateSelectorUtil ds)
Get difference in millisecond
|
static long |
getSleepingTimeInMilliSecond(java.util.Date d,
java.lang.String pattern)
calculate the sleeping time
|
static long |
getSleepingTimeInMilliSecond(java.util.Locale l,
java.util.TimeZone tz,
java.util.Date d,
DateSelectorUtil ds)
Get difference in millisecond
|
static long |
getSleepingTimeInMilliSecond(java.util.Locale l,
java.util.TimeZone tz,
java.util.Date d,
java.lang.String pattern)
calculate the sleeping time
|
static long |
getSleepingTimeInMilliSecond(java.lang.String pattern)
calculate the sleeping time
|
static DateSelectorUtil |
getSleepingTimeInObject(java.util.Date d,
java.lang.String pattern)
calculate the sleeping time
|
static DateSelectorUtil |
getSleepingTimeInObject(java.util.Locale l,
java.util.TimeZone tz,
java.util.Date d,
java.lang.String pattern)
calculate the sleeping time
|
static DateSelectorUtil |
getSleepingTimeInObject(java.lang.String pattern)
calculate the sleeping time
|
static int |
getWeekDayAsInt(java.util.Locale l,
java.lang.String weekDay)
Converts weekday to int to store in the pattern
|
public static final int DAY
public static final int WEEK
public static final int DAYOFMONTH
public static final int MONTH
public static java.util.Vector getPreviewDates(java.util.Date startDate, java.util.Date endDate, java.lang.String pattern) throws MXException
startDate
- endDate
- pattern
- MXException
public static java.util.Vector<java.util.Date> getPreviewDates(java.util.Locale l, java.util.TimeZone tz, java.util.Date startDate, java.util.Date endDate, java.lang.String pattern) throws MXException
l
- tz
- startDate
- endDate
- pattern
- MXException
public static java.util.Vector<java.util.Date> getPreviewDatesInServerTimeZone(java.util.Date startDate, java.util.Date endDate, java.lang.String pattern) throws MXException
l
- tz
- startDate
- endDate
- pattern
- MXException
public static java.util.Vector<java.util.Date> getPreviewDatesInClientPattern(java.util.Locale l, java.util.TimeZone tz, java.util.Date startDate, java.util.Date endDate, java.lang.String pattern) throws MXException
l
- tz
- startDate
- endDate
- pattern
- MXException
public static com.ibm.icu.util.Calendar getCalAfterSetPattern(java.util.Locale l, java.util.TimeZone tz, java.util.Date d, java.lang.String[] str, int repeatValue, java.lang.String timeUnit) throws MXException
l
- tz
- d
- pattern
- str
- repeatValue
- timeUnit
- MXException
public static java.lang.String[] getIndividualString(java.lang.String pattern) throws MXException
MXException
public static com.ibm.icu.util.Calendar getNextCalendar(com.ibm.icu.util.Calendar c, java.lang.String[] str, int repeatValue, java.lang.String timeUnit) throws MXException
c
- pattern
- str
- repeatValue
- timeUnit
- MXException
public static DateSelectorUtil getSleepingTimeInObject(java.lang.String pattern) throws MXException
pattern
- MXException
public static DateSelectorUtil getSleepingTimeInObject(java.util.Date d, java.lang.String pattern) throws MXException
d
- pattern
- MXException
public static DateSelectorUtil getSleepingTimeInObject(java.util.Locale l, java.util.TimeZone tz, java.util.Date d, java.lang.String pattern) throws MXException
l
- tz
- d
- pattern
- MXException
public long getDifference()
ds
- public static long getSleepingTimeInMilliSecond(DateSelectorUtil ds) throws MXException
ds
- MXException
public static long getSleepingTimeInMilliSecond(java.util.Locale l, java.util.TimeZone tz, java.util.Date d, DateSelectorUtil ds) throws MXException
d
- ds
- MXException
public static long getSleepingTimeInMilliSecond(java.util.Date nextScheduled, java.util.Date d) throws MXException
nextScheduled
- the future dated
- the current dateMXException
public static java.util.Date getNextPreviewDate(java.util.Locale l, java.util.TimeZone tz, java.util.Date d, DateSelectorUtil ds) throws MXException
l
- tz
- d
- ds
- MXException
public static long getSleepingTimeInMilliSecond(java.lang.String pattern) throws MXException
pattern
- MXException
public static long getSleepingTimeInMilliSecond(java.util.Date d, java.lang.String pattern) throws MXException
d
- pattern
- MXException
public static long getSleepingTimeInMilliSecond(java.util.Locale l, java.util.TimeZone tz, java.util.Date d, java.lang.String pattern) throws MXException
l
- tz
- d
- pattern
- MXException
public static int getWeekDayAsInt(java.util.Locale l, java.lang.String weekDay) throws MXException
l
- weekDay
- MXException
public static int getMonthAsInt(java.util.Locale l, java.lang.String month) throws MXException
l
- month
- MXException
public static int getDOMAsInt(java.lang.String domStr) throws MXException
domStr
- MXException
public static java.util.Date convertDateToClientDate(java.util.Date d, java.util.Locale l, java.util.TimeZone tz) throws MXApplicationException
MXApplicationException
public static com.ibm.icu.util.Calendar getCalendarForPattern(java.lang.String d, int day, int month, java.util.Locale l, java.util.TimeZone tz, int type) throws MXApplicationException
MXApplicationException
public static com.ibm.icu.util.Calendar getCalendarForPattern(java.lang.String d, int day, int month, java.util.Locale l, java.util.TimeZone tz, java.util.Locale clientl, java.util.TimeZone clienttz, int type) throws MXApplicationException
MXApplicationException