This filter identifies dates, such as May 22, 2014 . The following is not a complete list of supported formats but intended to illustrate the variety of formats supported. If you have questions about specific date formats please contact us.
Format | Example |
---|---|
yyyy-MM-d | 2020-05-10 |
MM-dd-yyyy | 05-10-2020 |
M-d-y | 5-10-2020 |
MMM dd | May 5 or May 05 |
MMMM dd, yyyy | May 5, 2020 or May 5 2020 |
Required Parameters
This filter has no required parameters.
Optional Parameters
Parameter | Description | Default Value |
---|---|---|
dateFilterStrategies | A list of filter strategies. | |
enabled | When set to false, the filter will be disabled and not applied. | true |
ignored | A list of terms to be ignored by the filter. | |
onlyValidDates | When set to true, only valid dates will be filtered. | false |
Filter Strategies
The filter may have zero or more filter strategies. When no filter strategy is given the default strategy of REDACT is used. When multiple filter strategies are given the filter strategies will be applied in as they are listed. See for details.
Strategy | Description |
---|---|
REDACT | Replace the sensitive text with a placeholder. |
RANDOM_REPLACE | Replace the sensitive text with a similar, random value. |
STATIC_REPLACE | Replace the sensitive text with a given value. |
CRYPTO_REPLACE | Replace the sensitive text with its encrypted value. |
HASH_SHA256_REPLACE | Replace the sensitive text with its SHA256 hash value. |
SHIFT | Shift the date by a number of months, days, and/or years. |
RELATIVE | Replace the date by words relative to the date. |
Filter Strategy Options
The following filter strategy options are available for the RELATIVE filter strategy.
Description | Default Value | |
---|---|---|
futureDates | When true, future dates are replaced by relative words. When false, future dates are redacted. | false |
The following filter strategy options are available for the SHIFT filter strategy.
Description | Default Value | |
---|---|---|
shiftDays | The number of days to shift the date. Can be a negative or positive integer. | 0 |
shiftMinutes | The number of minutes to shift the date. Can be a negative or positive integer. | 0 |
shiftYears | The number of years to shift the date. Can be a negative or positive integer. | 0 |
Conditions
Each filter strategy may have one condition. See Conditions for details.
Conditional | Description | Operators |
---|---|---|
TOKEN | Compares the value of the sensitive text. | ==, != |
TOKEN | Compares the value of the sensitive text to some category, e.g. birthdate. | is |
CONTEXT | Compares the value of the filtering context. | ==, != |
CONFIDENCE | Compares the value of the confidence of the sensitive text against a threshold value. | <, <=, >, >=, ==, != |
Differentiating Between Dates and Birth Dates
In some cases it may be necessary to redact birth dates and dates differently. Using conditions it is possible to determine if an identified date is a birth date. The conditional token is birthdate will determine if the identified date (token) is a birth date by analyzing the content surrounding the date.
Example Filter Profile to Redact Dates
Below is a sample filter profile illustrating usage of this filter.
{ "name": "dates-example", "identifiers": { "date": { "onlyValidDates": false, "dateFilterStrategies": [ { "strategy": "REDACT", "redactionFormat": "{{{REDACTED-%t}}}" } ] } } }
Example Filter Profile to Shift Dates
The following filter profile to shift dates forward by 2 days and 4 months.
{ "name": "dates-example", "identifiers": { "date": { "onlyValidDates": false, "dateFilterStrategies": [ { "strategy": "SHIFT", "shiftDays": 2, "shiftMonths": 4, "shiftYears": 0 } ] } } }