Formula 1.0.0

hirondelle.formula.function.builtin
Class DaysUntil

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

public final class DaysUntil
extends Object
implements Function

daysuntil(y,m,d): the number of days until a given date. Accepts fractional days.


Constructor Summary
DaysUntil()
           
 
Method Summary
 Decimal calculate(Decimal... aArgs)
          Takes 3 arguments, consisting of a year-month-day triplet.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DaysUntil

public DaysUntil()
Method Detail

calculate

public Decimal calculate(Decimal... aArgs)
Takes 3 arguments, consisting of a year-month-day triplet. The year-month-day triplet satisfies Check.date(Decimal, Decimal, Decimal).

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

//number of days until 2013-01-31:
daysuntil(2013,1,31) => 4

This function is unusual, since its return value depends on when you call it.

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