implement LogSource.EarliestDate()

This commit is contained in:
mappu 2017-08-13 14:41:07 +12:00
parent 62cc053c10
commit 90dc93fc52

View File

@ -26,6 +26,11 @@ type LogSource struct {
FileLocation []LogLocation FileLocation []LogLocation
} }
func (this *LogSource) EarliestDate() YearMonth {
// assume it's the first in the list (although it might not be)
return this.FileLocation[0].StartMonth
}
func (this *LogSource) LatestDate() YearMonth { func (this *LogSource) LatestDate() YearMonth {
// assume it's the last in the list (although it might not be) // assume it's the last in the list (although it might not be)
end := this.FileLocation[len(this.FileLocation)-1].EndMonth end := this.FileLocation[len(this.FileLocation)-1].EndMonth