The Duration Operator component calculates the period of time between two dates. The period of time is expressed in seconds, minutes, hours, or days and saved in a new numerical property. You can specify the precision unit, the rounding mode, the rounding step, and the threshold of the period of time.
In a price plan, you may need to calculate a price that is dependent of time. To compute the period of time, you use the Duration Operator that calculates the period of time between a start date and an end date.
In a chargeable item class called “Video Conference,” you charge the customer $0.10 per videoconference minute. After the start and stop date of the videoconference, a Duration component calculates the duration of the videoconference in the price plan.
Name: Type the name of the component (mandatory).
Description: Allows you to type the description of the component (optional).
The Duration Operator calculates the period of time between two dates: The start date property and the end date property. The result is saved in a generated property.
Start Date Property Name: Provides the list of date properties. Select a start date property.
End Date Property Name: Provides the list of date properties. Select an end date property.
Name of the Generated Property: Type the name of the new numerical property that retrieves the calculation result.
Time Unit: Provides the list of time units. Select one of the following units:
seconds
minutes
hours
days
You set up the parameters to make calculation.
Rounding Mode: Provides the list of modes for rounding the decimal portion of the period of time. The default option is To the next greater value. Select one of the following rounding modes:
To the next greater value
To the previous value
To the nearest value
Precision Unit: Provides the list of time units. The default option is seconds. Select one of the following time units:
seconds
minutes
hours
days
Rounding Step: Allows you to type a step rule to round the period of time, or allows you to select a numerical property that represents the step rule. The default option is 1. Example: If the rounding step value is 5 seconds and the rounding mode is To the next greater value, the period of 47 seconds is rounded to 50 seconds. In this example, the rounding step then consists of 5-second intervals.
Threshold: Allows you to type the minimum value of the period of time, or allows you to select a numerical property that represents the minimum value. The default option is 0. Example: If the threshold is 30 seconds, a period less than 30 seconds is rounded to 30 seconds.