Formula 1.0.0

hirondelle.formula.function.builtin
Class DaysPlus

Object
  extended by hirondelle.formula.function.builtin.DaysPlus
All Implemented Interfaces:
Function

public final class DaysPlus
extends Object
implements Function

daysplus(y,m,d,n): a date n days after a given date. Accepts fractional days.


Constructor Summary
DaysPlus()
           
 
Method Summary
 Decimal calculate(Decimal... aArgs)
          Takes 4 arguments, consisting of a year-month-day triplet, and the number of days to add to it.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DaysPlus

public DaysPlus()
Method Detail

calculate

public Decimal calculate(Decimal... aArgs)
Takes 4 arguments, consisting of a year-month-day triplet, and the number of days to add to it. The year-month-day triplet satisfies Check.date(Decimal, Decimal, Decimal).

Example (with Decimals represented by their values, for convenience):

//the day after 1957-10-04:
daysminus(1957,10,4,1) => 19571005

The return value is an encoding of a date into a Decimal. In the above example, the returned date is

1957-10-05 (October 5, 1957)
Any decimal portion in the return value reflects a fraction of a day.

Specified by:
calculate in interface Function
Parameters:
aArgs - 0 or more arguments to the function.

Formula 1.0.0

Copyright Hirondelle Systems. Published January 31, 2013