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


getEarliest

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


min

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


max

public static java.util.Date max(java.util.Date d1,
                                 java.util.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