TUM CCSM Commons

edu.tum.cs.commons.date
Class DateUtils

java.lang.Object
  extended by edu.tum.cs.commons.date.DateUtils

public class DateUtils
extends Object

Utility methods for working on date objects.

Version:
$Rev: 29593 $
Author:
juergens, $Author: hummelb $
Rating:
GREEN Hash: A327B6CB6CF8E826F60F8D16EBA23DEC

Constructor Summary
DateUtils()
           
 
Method Summary
static Date getEarliest(Collection<Date> dates)
          Returns the earliest date in a collection of dates
static Date getLatest(Collection<Date> dates)
          Returns the latest date in a collection of dates
static Date max(Date d1, Date d2)
          Returns the later of two dates or null, if one of the dates is null.
static Date min(Date d1, Date d2)
          Returns the earlier of two dates, or null, if one of the dates is null
 
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

getLatest

public static Date getLatest(Collection<Date> dates)
Returns the latest date in a collection of dates


getEarliest

public static Date getEarliest(Collection<Date> dates)
Returns the earliest date in a collection of dates


min

public static Date min(Date d1,
                       Date d2)
Returns the earlier of two dates, or null, if one of the dates is null


max

public static Date max(Date d1,
                       Date d2)
Returns the later of two dates or null, if one of the dates is null.


TUM CCSM Commons

TUM CCSM Commons - 2.7