TIBCO Software Inc. EBX®
Documentation > Developer Guide > EBX® Scripting > Function field API
Navigation modeDocumentation > Developer Guide > EBX® Scripting > Function field API

Unit core.date

Script unit that provides date functions.

Methods

function addYears(value: date, years: decimal): date

Adds years to a date.

function addMonths(value: date, months: decimal): datetime

Adds months to a date.

function addDays(value: date, days: decimal): date

Adds days to a date.

function fromDatetime(value: datetime): date

Converts a date and time to a date.

function days(startValue: date, endValue: date): decimal

Returns the number of days between two dates.

function seconds(startValue: date, endValue: date): decimal

Returns the number of seconds between two dates.

function addYears(value: date, years: decimal): date

Adds years to a date.

Parameters :

value: the input date

years: the number of years to be added. Must be an integer.

Return :

the new date or null if any parameter is null.

function addMonths(value: date, months: decimal): datetime

Adds months to a date.

Parameters :

value: the input date

months: the number of months to be added. Must be an integer.

Return :

the new date or null if any parameter is null.

function addDays(value: date, days: decimal): date

Adds days to a date.

Parameters :

value: the input date

months: the number of days to be added. Must be an integer.

Return :

the new date or null if any parameter is null.

function fromDatetime(value: datetime): date

Converts a date and time to a date. The input time part is ignored.

Parameters :

value: the input date and time

Return :

the new date or null if parameter is null.

function days(startValue: date, endValue: date): decimal

Returns the number of days between two dates.

Parameters :

startValue: the input start date

endValue: the input end date

Return :

the number of days or null if any parameter is null.

function seconds(startValue: date, endValue: date): decimal

Returns the number of seconds between two dates.

Parameters :

startValue: the input start date inclusive

endValue: the input end date exclusive

Return :

the number of seconds or null if any parameter is null.

Documentation > Developer Guide > EBX® Scripting > Function field API