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:
parent
f4d00cd9d8
commit
468e91cb8b
4 changed files with 8 additions and 37 deletions
|
|
@ -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{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue