public class SKDDateUtility
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
SKDDateUtility() |
Modifier and Type | Method and Description |
---|---|
static java.util.Date |
addDays(java.util.Locale l,
java.util.TimeZone tz,
java.util.Date date,
int plusDays)
Add a number of days to a date.
|
static java.util.Date |
combineDateTime(java.util.Locale l,
java.util.TimeZone tz,
java.util.Date date,
java.util.Date time)
Combine fist Date's date and second Date's time and return a new date.
|
static java.util.Date |
ConvertDateToServerTimezone(java.util.Date d,
java.util.Locale l,
java.util.TimeZone tz)
Returns the date in timezone and locale
|
static java.util.Date |
findEndDate(java.util.Locale l,
java.util.TimeZone tz,
java.util.Date startDate,
double duration)
Get the end date for an activity giving start date and duration
|
static java.util.Date |
findStartDate(java.util.Locale l,
java.util.TimeZone tz,
java.util.Date endDate,
double duration)
Get the start date for an activity giving end date and duration
|
static java.util.Date |
getDateOnly(java.util.Locale l,
java.util.TimeZone tz,
java.util.Date date)
Get date without time
Set time portion of passed date to 00:00:00
|
static java.util.TreeMap<java.util.Date,java.util.Date> |
getStartEndMap(java.util.Locale l,
java.util.TimeZone tz,
java.util.ArrayList<java.util.Date> mergedNonWorkPeriods)
Get start and end date pair from merged non work periods
|
public static java.util.Date combineDateTime(java.util.Locale l, java.util.TimeZone tz, java.util.Date date, java.util.Date time)
locale
- timezone
- date
- time
- public static java.util.Date getDateOnly(java.util.Locale l, java.util.TimeZone tz, java.util.Date date)
locale
- timezone
- date
- public static java.util.Date addDays(java.util.Locale l, java.util.TimeZone tz, java.util.Date date, int plusDays)
locale
- timezone
- date
- days
- to addpublic static java.util.Date findEndDate(java.util.Locale l, java.util.TimeZone tz, java.util.Date startDate, double duration) throws java.lang.Exception
locale
- timezone
- startDate
- duration
- java.lang.Exception
public static java.util.Date findStartDate(java.util.Locale l, java.util.TimeZone tz, java.util.Date endDate, double duration) throws java.lang.Exception
locale
- timezone
- endDate
- duration
- java.lang.Exception
public static java.util.TreeMap<java.util.Date,java.util.Date> getStartEndMap(java.util.Locale l, java.util.TimeZone tz, java.util.ArrayList<java.util.Date> mergedNonWorkPeriods) throws java.lang.Exception
locale
- timezone
- ArrayList
- mergedNonWorkPeriodsjava.lang.Exception
public static java.util.Date ConvertDateToServerTimezone(java.util.Date d, java.util.Locale l, java.util.TimeZone tz)
l
- tz
- RemoteException