Skip to content

Date Shift

Extensible Algorithm Framework

The Date Shift framework masks date values to different dates based on a specified range around the input value. Masked values are calculated algorithmically using the algorithm's key, so rekeying the algorithm will cause different outputs to be generated for each input. All valid input values will be masked to a new value, and the new value will never match the input.

Creating a Date Shift Algorithm via UI

  1. In the upper right-hand region of the Algorithm tab under Settings, click Add Algorithm.

  2. Select Date. The "Create Date Algorithm" pane appears.

  3. Enter an Algorithm Name.

    Info

    This MUST be unique.

  4. Enter a Description.

  5. Under Select Algorithm type choose Shift.

  6. Enter Min Value and Max Value. These values provide a range in which the masked value will differ from the input given a specified unit of time. The range is inclusive of both values where negative values represent units of time in the past and positive values represent units of time in the future. 0 may be included in the range or as one of the range values, but the input will not mask to the same value. A minimum value and maximum value that are equal will result in a fixed shift of that amount of time. For example, entering 3 as a min value and 3 as a max value with a unit of Days will mask all input values to 3 days in the future.

  7. Check the Roll box to preserve all units of time larger and smaller than the specified unit. Only the value of the specified unit will change. This option is supported for units months, days, hours, minutes, and seconds.

  8. Choose the Unit of time from the drop-down: Years, Months, Days, Hours, Minutes, or Seconds. This represents the unit of time the range is expressed in.

  9. When you are finished, click Save.

For information on creating Date Shift algorithms through the API, see API Calls for Creating Algorithms - Date Shift.

Examples

As an example, a Date Shift algorithm with a minimum value of 3 and a maximum value of 5 with the unit set to Days will shift the input value from 3 to 5 days into the future. Dates may mask as follows:

  • "2021-02-03 12:30:00" → "2021-02-06 12:30:00"
  • "1905-12-10 00:00:00" → "1905-12-15 00:00:00"
  • "2001-07-31 23:45:30" → "2001-08-04 23:45:30"

With roll enabled and the same configuration, a date at the end of a month will wrap around to the beginning of the month. Dates may mask as follows:

  • "2021-02-25 10:00:00" → "2021-02-01 10:00:00"
  • "1932-05-03 01:15:15" → "1932-05-08 01:15:15"
  • "1999-08-31 18:30:00" → "1999-08-03 18:30:00"

All inputs with the same value masked with the same algorithm configuration will result in the same output values.