Skip to content

Date Replacement

Extensible Algorithm Framework

The Date Replacement framework masks a date value based on specified beginning and end dates. Masked output values are calculated algorithmically using the algorithm's key, so rekeying the algorithm will cause a different output value to be generated for each input. It is possible for an input to be masked to itself.

Creating a Date Replacement 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 Replacement.

  6. Enter Min Date and Max Date. These define the range from which the algorithm will select output values. The range is inclusive of both values. All units of time less than the specified unit must be set to 0. For example, a configuration with the unit set to Days must have the time portion set to 00:00:00.

  7. Choose the Unit of time form the drop-down: Days, Hours, Minutes, or Seconds. This represents the unit of time the range is expressed in. Any unit smaller than the specified unit will be set to 0 in the masked output. For example, with a unit of Days, all masked time values will be 00:00:00. For a more detailed explanation, see the Examples section.

  8. When you are finished, click Save.

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

Examples

As an example, a Date Replacement algorithm with a minimum range of "2020-01-01 00:00:00" and a maximum range of "2020-01-05 00:00:00" with the unit set to Days will replace the input value with a date in the specified range. Dates may mask as follows:

  • "1995-03-05 13:25:00" → "2020-01-02 00:00:00"
  • "2021-10-13 01:59:59" → "2020-01-04 00:00:00"
  • "1856-07-31 00:00:00" → "2020-01-01 00:00:00"

Another example with a minimum range of "2020-01-01 01:00:00" and a maximum range of "2020-01-01 03:00:00" with the unit set to Hours provides 3 possible mask values:

  • "2020-01-01 01:00:00"
  • "2020-01-01 02:00:00"
  • "2020-01-01 03:00:00"

Using the same range of "2020-01-01 01:00:00" to "2020-01-01 03:00:00" but with the unit set to Minutes, there are 121 possible output values as the unit is the granularity at which time is subdivided. Note that the range is inclusive of both range values. Possible masked values may be as follows:

  • "2020-01-01 01:00:00"
  • "2020-01-01 01:14:00"
  • "2020-01-01 01:59:00"
  • "2020-01-01 02:23:00"
  • "2020-01-01 03:00:00"

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