|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.hr.time.util.TKUtils
public class TKUtils
Constructor Summary | |
---|---|
TKUtils()
|
Method Summary | |
---|---|
static Date |
addDates(Date aDate,
int aNumber)
|
static String |
arrayToString(String[] stringArray)
|
static Timestamp |
convertDateStringToTimestamp(String dateStr)
Creates a Timestamp object using Jodatime as an intermediate data structure from the provided date and time string. |
static Timestamp |
convertDateStringToTimestamp(String dateStr,
String timeStr)
Creates a Timestamp object using Jodatime as an intermediate data structure from the provided date and time string. |
static Timestamp |
convertDateStringToTimestampNoTimezone(String dateStr)
Creates a Timestamp object using Jodatime as an intermediate data structure from the provided date and time string. |
static Timestamp |
convertDateStringToTimestampWithoutZone(String dateStr,
String timeStr)
|
static long |
convertHoursToMillis(BigDecimal hours)
|
static BigDecimal |
convertMillisToDays(long millis)
|
static BigDecimal |
convertMillisToHours(long millis)
|
static BigDecimal |
convertMillisToMinutes(long millis)
|
static int |
convertMillisToWholeDays(long millis)
|
static BigDecimal |
convertMinutesToHours(BigDecimal minutes)
|
static Date |
createDate(int month,
int day,
int year,
int hours,
int minutes,
int seconds)
|
static List<org.joda.time.Interval> |
createDaySpan(org.joda.time.DateTime beginDateTime,
org.joda.time.DateTime endDateTime,
org.joda.time.DateTimeZone zone)
|
static Map<String,String> |
formatAssignmentDescription(Assignment assignment)
|
static String |
formatAssignmentKey(Long jobNumber,
Long workArea,
Long task)
|
static String |
formatDate(Date dt)
|
static Date |
formatDateString(String date)
|
static String |
formatDateTime(Timestamp timestamp)
|
static String |
getAssignmentString(Assignment assignment)
|
static Date |
getCurrentDate()
|
static Timestamp |
getCurrentTimestamp()
|
static String |
getDayOfMonthFromDateString(String dateString)
|
static long |
getDaysBetween(Calendar startDate,
Calendar endDate)
|
static long |
getDaysBetween(Date startDate,
Date endDate)
|
static List<org.joda.time.Interval> |
getDaySpanForCalendarEntry(CalendarEntries calendarEntry)
|
static List<org.joda.time.Interval> |
getDaySpanForCalendarEntry(CalendarEntries calendarEntry,
org.joda.time.DateTimeZone timeZone)
Constructs a list of Day Spans for the pay calendar entry provided. |
static String |
getFromDateString(String dateString)
Returns effectiveDate "from" date that's passed in through dateString. |
static List<org.joda.time.Interval> |
getFullWeekDaySpanForCalendarEntry(CalendarEntries calendarEntry)
|
static List<org.joda.time.Interval> |
getFullWeekDaySpanForCalendarEntry(CalendarEntries calendarEntry,
org.joda.time.DateTimeZone timeZone)
|
static BigDecimal |
getHoursBetween(long start,
long end)
|
static String |
getIPAddressFromRequest(javax.servlet.http.HttpServletRequest request)
|
static String |
getIPNumber()
|
static int |
getNumberOfWeeks(Date beginDate,
Date endDate)
|
static int |
getSessionTimeoutTime()
Get the session timeout time. |
static org.joda.time.DateTimeZone |
getSystemDateTimeZone()
|
static String |
getSystemTimeZone()
|
static Date |
getTimelessDate(Date date)
Returns a enforced timeless version of the provided date, if the date is null the current date is returned. |
static String |
getTimezoneOffset(org.joda.time.DateTime date)
Method to obtain the timezone offset string for the specified date time. |
static String |
getToDateString(String dateString)
Returns effectiveDate "to" date that's passed in through dateString. |
static List<org.joda.time.Interval> |
getWeekIntervals(Date beginDate,
Date endDate)
Includes partial weeks if the time range provided does not divide evenly into 7 day spans. |
static int |
getWorkDays(Date startDate,
Date endDate)
|
static boolean |
isVirtualWorkDay(Calendar payCalendarStartTime)
|
static boolean |
isWeekend(Date aDate)
|
static Date |
removeTime(Date date)
|
static Date |
subtractOneMillisecondFromDate(Date date)
|
static Timestamp |
subtractOneSecondFromTimestamp(Timestamp originalTimestamp)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TKUtils()
Method Detail |
---|
public static Date getCurrentDate()
public static String getDayOfMonthFromDateString(String dateString)
dateString
- the format has to be mm/dd/yyyy
public static String getSystemTimeZone()
public static org.joda.time.DateTimeZone getSystemDateTimeZone()
public static Date getTimelessDate(Date date)
date
-
public static long getDaysBetween(Calendar startDate, Calendar endDate)
public static long getDaysBetween(Date startDate, Date endDate)
public static BigDecimal getHoursBetween(long start, long end)
public static int getNumberOfWeeks(Date beginDate, Date endDate)
public static String formatAssignmentKey(Long jobNumber, Long workArea, Long task)
public static Map<String,String> formatAssignmentDescription(Assignment assignment)
public static String getAssignmentString(Assignment assignment)
public static List<org.joda.time.Interval> getDaySpanForCalendarEntry(CalendarEntries calendarEntry, org.joda.time.DateTimeZone timeZone)
calendarEntry
- timeZone
-
public static List<org.joda.time.Interval> getWeekIntervals(Date beginDate, Date endDate)
beginDate
- Starting Date/TimeendDate
- Ending Date/Time
public static long convertHoursToMillis(BigDecimal hours)
public static BigDecimal convertMillisToHours(long millis)
public static BigDecimal convertMillisToMinutes(long millis)
public static BigDecimal convertMillisToDays(long millis)
public static BigDecimal convertMinutesToHours(BigDecimal minutes)
public static int convertMillisToWholeDays(long millis)
public static boolean isVirtualWorkDay(Calendar payCalendarStartTime)
public static Timestamp convertDateStringToTimestamp(String dateStr, String timeStr)
dateStr
- (the format is 01/01/2011)timeStr
- (the format is 8:0)
public static Timestamp convertDateStringToTimestampWithoutZone(String dateStr, String timeStr)
public static String getIPAddressFromRequest(javax.servlet.http.HttpServletRequest request)
public static Date createDate(int month, int day, int year, int hours, int minutes, int seconds)
public static String getIPNumber()
public static Timestamp subtractOneSecondFromTimestamp(Timestamp originalTimestamp)
public static Date subtractOneMillisecondFromDate(Date date)
public static String formatDate(Date dt)
public static String formatDateTime(Timestamp timestamp)
public static Date formatDateString(String date)
public static String getTimezoneOffset(org.joda.time.DateTime date)
date
-
public static String arrayToString(String[] stringArray)
public static int getSessionTimeoutTime()
public static Timestamp convertDateStringToTimestamp(String dateStr)
dateStr
- (the format is 01/01/2011)
public static Timestamp convertDateStringToTimestampNoTimezone(String dateStr)
dateStr
- (the format is 01/01/2011)
public static Timestamp getCurrentTimestamp()
public static List<org.joda.time.Interval> createDaySpan(org.joda.time.DateTime beginDateTime, org.joda.time.DateTime endDateTime, org.joda.time.DateTimeZone zone)
public static List<org.joda.time.Interval> getDaySpanForCalendarEntry(CalendarEntries calendarEntry)
public static List<org.joda.time.Interval> getFullWeekDaySpanForCalendarEntry(CalendarEntries calendarEntry)
public static List<org.joda.time.Interval> getFullWeekDaySpanForCalendarEntry(CalendarEntries calendarEntry, org.joda.time.DateTimeZone timeZone)
public static Date removeTime(Date date)
public static int getWorkDays(Date startDate, Date endDate)
public static boolean isWeekend(Date aDate)
public static Date addDates(Date aDate, int aNumber)
public static String getFromDateString(String dateString)
dateString
-
public static String getToDateString(String dateString)
dateString
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |