org.shept.util
Class DateUtils

java.lang.Object
  extended by org.shept.util.DateUtils

public class DateUtils
extends Object


Constructor Summary
DateUtils()
           
 
Method Summary
static Date add(Date d, int field, int amount)
          Deprecated. 
static Date datePart_Old(Date date)
          Deprecated. 
static Calendar datePart(Calendar date)
          Return a calendars day-part only
static Date datePart(Date date)
          Return a date's day part only
static boolean isSameDay(Calendar day1, Calendar day2)
          Return true if both calenday date's are of the same day
static Date merge_Old(Date date, Date time)
          Deprecated. 
static Calendar merge(Calendar date, Calendar time)
          Merge two calendars, one with the day date component and the other with a time component.
static Date merge(Date date, Date time)
          Deprecated.  
static Integer minOfDay(Calendar calendar)
          Return the calendars minute count since midnight
static Integer minOfDay(Date d)
          Deprecated. 
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateUtils

public DateUtils()
Method Detail

merge

public static Calendar merge(Calendar date,
                             Calendar time)
Merge two calendars, one with the day date component and the other with a time component. The resutling calendar is of the date's locale and timezone. If the time argument is null the method returns only the date's date with 00:00:00 time. If the date is null current date is used

Parameters:
date -
time -
Returns:

merge

public static Date merge(Date date,
                         Date time)
Deprecated. 

Merge a date's date part with another dates time part

Parameters:
date -
time -
Returns:

merge_Old

@Deprecated
public static Date merge_Old(Date date,
                                        Date time)
Deprecated. 


datePart

public static Calendar datePart(Calendar date)
Return a calendars day-part only

Parameters:
date -
Returns:

datePart

public static Date datePart(Date date)
Return a date's day part only

Parameters:
date -
Returns:

datePart_Old

@Deprecated
public static Date datePart_Old(Date date)
Deprecated. 


add

@Deprecated
public static Date add(Date d,
                                  int field,
                                  int amount)
Deprecated. 


isSameDay

public static boolean isSameDay(Calendar day1,
                                Calendar day2)
Return true if both calenday date's are of the same day

Parameters:
day1 -
day2 -
Returns:

minOfDay

public static Integer minOfDay(Calendar calendar)
Return the calendars minute count since midnight

Parameters:
calendar -
Returns:

minOfDay

@Deprecated
public static Integer minOfDay(Date d)
Deprecated. 



Copyright © 2011. All Rights Reserved.