Commit a8f3a265 authored by Jonny Schäfer's avatar Jonny Schäfer
Browse files

optimize code and description of videoIsYounger

parent c0a0e705
......@@ -107,12 +107,10 @@ func (v *videoSort) Len() int {
return len(v.slice)
}
// videoIsYounger returns if young is younger than old
// videoIsYounger compares the given two videos and returns true if the release
// date of young is more recent than the release date of old
func videoIsYounger(young, old *videoContainer) bool {
if videoDateToSeconds(young.date) < videoDateToSeconds(old.date) {
return true
}
return false
return videoDateToSeconds(young.date) < videoDateToSeconds(old.date)
}
// videoDateToSeconds calculates the number of past seconds since the given date
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment