<date-math>

Purpose/Function

Modify a date object by adding or subtracting a value for one of its fields.

Attributes

NAME

TYPE

DEFAULT VALUE

DESCRIPTION

add

int

0

increment value

subtract

int

0

decrement value

date

java.util.Date

(required if inputString not set)

date to modify

inputString

java.lang.String

(required if date not set)

date to modify

field

java.lang.String

(required)

name of the date field to modify; one of: "year", "month", "day", "hour", "minute", or "second"

format

java.util.String

"yyyy/MM/dd HH:mm:ss"

format used for conversion of string to date

Elements

None.

ReturnValues

DEFAULT NAME

TYPE

DESCRIPTION

date

java.util.Date

new date object produced by the increment or decrement of the given field

Examples

<date-math date="${start.date}" field="hour" add="${forecast.time}">
    <return-value assignedName="end.date" defaultName="date" />
</date-math>
  • No labels