Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.util
Interface DateRange

All Known Implementing Classes:
AbsoluteDateRange, RelativeDateRange, UnboundedDateRange

public interface DateRange

A DateRange converts an abstract starting and ending time into specific instances in time. For example, the conceptual date range of "last year" might be translated into the actual start and end date of "January 1, 2000" to "December 31, 2000."


Method Summary
 java.lang.String getDisplayName()
          Returns a string representing a human-readable descriptive name of this date range.
 java.util.Date getEndDate(java.util.Date date, javax.servlet.http.HttpServletRequest request, User user)
          Returns a specific end date for this date range based on the specified date.
 java.util.Date getStartDate(java.util.Date date, javax.servlet.http.HttpServletRequest request, User user)
          Returns a specific start date for this date range based on the specified date.
 

Method Detail

getStartDate

java.util.Date getStartDate(java.util.Date date,
                            javax.servlet.http.HttpServletRequest request,
                            User user)
Returns a specific start date for this date range based on the specified date.

Parameters:
date - the date to base a date range calculation on. Most often, this will be the current instance in time.
request - the request object that may have locale information in it.
user - the User to use in determining locale
Returns:
a specific start date based on date.

getEndDate

java.util.Date getEndDate(java.util.Date date,
                          javax.servlet.http.HttpServletRequest request,
                          User user)
Returns a specific end date for this date range based on the specified date.

Parameters:
date - the date to base a date range calculation on. Most often, this will be the current instance in time.
request - the request object that may have locale information in it.
user - the User to use in determining locale
Returns:
a specific end date based on date.

getDisplayName

java.lang.String getDisplayName()
Returns a string representing a human-readable descriptive name of this date range.

Returns:
a descriptive name of this date range.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.