org.obe.spi.runtime
Interface BusinessCalendar


public interface BusinessCalendar

Provides date arithmetic services based on a business calendar. It provides stateless versions of the date arithmetic methods of java.util.Calendar.

Author:
Adrian Price

Method Summary
 java.util.Date add(java.util.Date base, DurationUnit unit, int interval, java.lang.String user)
          Wraps the Calendar Date Arithmetic function.
 java.util.Date add(java.util.Date base, int field, int interval, java.lang.String user)
          Wraps the Calendar Date Arithmetic function.
 

Method Detail

add

public java.util.Date add(java.util.Date base,
                          int field,
                          int interval,
                          java.lang.String user)
Wraps the Calendar Date Arithmetic function. Adds the specified (signed) amount of time to the given time field, based on the calendar's rules.

Parameters:
base - The base date.
field - The JDK calendar field code.
interval - The amount of date or time to be added to the field.
user - The (optional) user name for which the computation is being performed. Calendar implementations can use this information to ensure that temporal computations take proper account of a user's time zone.
Returns:
The result of the date computation.

add

public java.util.Date add(java.util.Date base,
                          DurationUnit unit,
                          int interval,
                          java.lang.String user)
Wraps the Calendar Date Arithmetic function. Adds the specified (signed) amount of time using the given duration unit, based on the calendar's rules.

Parameters:
base - The base date.
unit - The XPDL duration unit to use.
interval - The amount of date or time to be added to the field.
user - The (optional) user name for which the computation is being performed. Calendar implementations can use this information to ensure that temporal computations take proper account of a user's time zone.
Returns:
The result of the date computation.


SourceForge.net Logo OBE-1.0 Copyright (c) 2002-2006 Adrian Price. All Rights Reserved.