Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.
This repository was archived by the owner on Sep 26, 2023. It is now read-only.

Add anonymisation action: Range of dates #13

Description

@albertpastrana

Another very common way to reduce date precision is to group dates according to a period of time from an initial date.

For example, if we have the date of birth of a person, we may want to output what range of years the age of this person belongs to.

e.g. 1/1/1990 -> 1990 or 20-30 years

Possible config:

{
  "actions": [
    {
      "name": "timeElapsed",
      "dateConfig": {
        "format": "YYYYmmmdd",
        // should we count the number of months or years
        "elapsedIn": "years",
        // since when should we count
        // accepts a date in the above format or `now` as a value
        "since": "19901212"
      },
      "rangeConfig": {
        "ranges": [
          {
            "gt": 20,
            "lte": 30,
            "output": "20-30 years"
          }
        ]
      }
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions