-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Accept days, months and years in time ranges. (#483)
- Loading branch information
1 parent
81edb6c
commit 455010d
Showing
3 changed files
with
105 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,11 +102,14 @@ into a given intervall. There are three possible notations: | |
1. Relative. If the given string follows the rules of a | ||
[Go duration](https://pkg.go.dev/[email protected]#ParseDuration), | ||
the time interval from now going back that duration is used. | ||
Some examples: | ||
- `"3h"` means downloading the advisories that have changed in the last three hours. | ||
- `"30m"` .. changed within the last thirty minutes. | ||
- `"72h"` .. changed within the last three days. | ||
- `"8760h"` .. changed within the last 365 days. | ||
In extension to this the suffixes 'd' for days, 'M' for month | ||
and 'y' for years are recognized. In these cases only integer | ||
values are accepted without any fractions. | ||
Some examples: | ||
- `"3h"` means downloading the advisories that have changed in the last three hours. | ||
- `"30m"` .. changed within the last thirty minutes. | ||
- `"3M2m"` .. changed within the last three months and two minutes. | ||
- `"2y"` .. changed within the last two years. | ||
|
||
2. Absolute. If the given string is an RFC 3339 date timestamp | ||
the time interval between this date and now is used. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters