Formula 1.0.0

hirondelle.formula.function.builtin
Class DaysSince

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

public final class DaysSince
extends Object
implements Function

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


Constructor Summary
DaysSince()
           
 
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

DaysSince

public DaysSince()
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 since 2013-01-01:
dayssince(2013,1,1) => 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