unit
Note
- filtertype: age
source: creation_date
direction: older
unit: days
unit_count: 3
This setting must be one of seconds, minutes, hours, days, weeks, months, or years. The values seconds and minutes are not allowed with the period filtertype and will result in an error condition if used there.
For the age filtertype, or when use_age is set to True, unit, unit_count, and optionally, epoch, are used by Curator to establish the moment in time point of reference with this formula:
point_of_reference = epoch - ((number of seconds in unit) * unit_count)
units are calculated as follows:
| Unit | Seconds | Note |
|---|---|---|
seconds |
1 |
One second |
minutes |
60 |
Calculated as 60 seconds |
hours |
3600 |
Calculated as 60 minutes (60*60) |
days |
86400 |
Calculated as 24 hours (246060) |
weeks |
604800 |
Calculated as 7 days (72460*60) |
months |
2592000 |
Calculated as 30 days (302460*60) |
years |
31536000 |
Calculated as 365 days (3652460*60) |
If epoch is unset, the current time is used. It is possible to set a point of reference in the future by using a negative value for unit_count.
This setting must be set by the user or an exception will be raised, and execution will halt.
Tip
See the age filter documentation for more information about time calculation.