1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 11:55:40 +01:00

Remove the years flag from checker.

This commit is contained in:
Sascha L. Teichmann 2023-08-17 11:01:45 +02:00
parent f4d00cd9d8
commit 468e91cb8b
4 changed files with 8 additions and 37 deletions

View file

@ -28,13 +28,6 @@ func NewTimeInterval(a, b time.Time) TimeRange {
return TimeRange{a, b}
}
// NYears returns a time interval spanning the last years.
func NYears(years uint) TimeRange {
now := time.Now()
start := now.AddDate(-int(years), 0, 0)
return NewTimeInterval(start, now)
}
// guessDate tries to guess an RFC 3339 date time from a given string.
func guessDate(s string) (time.Time, bool) {
for _, layout := range []string{