Files
lo/docs/data/core-earliest.md
T
Samuel Berthe fa095e4b4f fix(doc): fix go playground demo URL (#832)
* fix(doc): fix go playground demo URL

* fix(doc): add more go playground demo URL
2026-03-06 00:09:59 +01:00

786 B

name, slug, sourceRef, category, subCategory, playUrl, variantHelpers, similarHelpers, position, signatures
name slug sourceRef category subCategory playUrl variantHelpers similarHelpers position signatures
Earliest earliest find.go#L363 core find https://go.dev/play/p/pRyy0c6hsBs
core#find#earliest
core#find#latest
core#find#earliestby
core#find#latestby
core#find#min
core#find#max
core#find#minby
core#find#maxby
core#find#minindex
core#find#maxindex
core#find#minindexby
core#find#maxindexby
180
func Earliest(times ...time.Time) time.Time

Searches the minimum time.Time in the provided arguments. Returns zero value when the input is empty.

t1 := time.Date(2023, 1, 1, 0, 0, 0, 0, time.UTC)
t2 := time.Date(2024, 1, 1, 0, 0, 0, 0, time.UTC)
min := lo.Earliest(t2, t1)
// 2023-01-01 00:00:00 +0000 UTC