Description

The FlexibleDateJumpGen Generator jumps the referenced date by n number of Days/Months/Years etc.


Parameters

The following parameters may be configured for the FlexibleDateJumpGen Generator. Items with an asterisk* are required. 

  • referenceDate* - Defines the reference to a date that we want to jump by jumpAmount.

  • referenceFormat* - Defines the date format for the reference data. Examples:
    • MM/dd/yy = 12/26/99
    • MM-dd-yy = 04-26-1995
    • yyyy-MM-dd HH:mm:ss = 2017-12-30 18:52:10

  • jumpBy* - Defines how the referenced data will be incremented or decremented by the generated value (Year, Month, Day, Hour, Minute, Second or Millisecond).

  • jumpAmount* - Defines how much to jump by. Default is 1.

  • outputFormat* - Defines the format of the output date.

  • randomizeMonthDay* - Defines if the Month and Day should be random if neither are set as the jumpBy value.

  • seed - Using the seed will ensure that the same random data is generated each time data is generated.


Example 1: End Date is N Number of Days from Generated Start Date

Let's suppose there are 2 Attributes, startDate and endDate and you want endDate to be n number of days apart for every startDate.


Three Generators will need to be be linked to properly show this example: 

  • randomNo = RandomGen
  • startDate = FlexibleDateRangeGen
  • endDate = FlexibleDateJumpGen 



Note: While this example shows how to do this with linked Generators, this can also be accomplished by referencing individual Attributes with these same configurations.

 

In this example, the RandomGen Generator (RandomNo - gen1) will generate a random number of days between 1 and 14. The Generator configuration is shown below: 



Note: Please note that this Generator can be used to generate a constant value as well. 


The FlexibleDateRangeGen Generator (startDate - gen2) is used to generate a random start date that will be used by the FlexibleDateRangeGen Generator (endDAte - gen3) to advance the date by the defined number of days (randomNo - gen1). The configuration is shown below: 



Finally, the FlexibleDateJumpGen Generator must have these references to work with the linked Generators: 

  • referenceDate Parameter = References startDate Generator (gen2)
  • jumpAmount Parameter = References randomNo Generator (gen1)



Sample Output