Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SaidinWoT/timespan
/ functions
Functions
53 in github.com/SaidinWoT/timespan
⨍
Functions
53
◇
Types & classes
1
↓ 10 callers
Method
Equal
Equal reports whether s and r represent the same time intervals, ignoring the locations of the times.
timespan.go:81
↓ 9 callers
Method
Before
Before reports whether s ends before t.
timespan.go:52
↓ 9 callers
Method
Follows
Follows reports whether s begins after or at the end of r.
timespan.go:86
↓ 9 callers
Function
New
New creates a new span with the given start instant and duration.
timespan.go:18
↓ 9 callers
Method
Precedes
Precedes reports whether s ends before or at the start of r.
timespan.go:148
↓ 8 callers
Method
After
After reports whether s begins after t.
timespan.go:47
↓ 7 callers
Method
ContainsTime
ContainsTime reports whether t is within s.
timespan.go:62
↓ 7 callers
Method
Duration
Duration returns the length of time represented by s.
timespan.go:42
↓ 6 callers
Method
Borders
Borders reports whether s and r are contiguous time intervals.
timespan.go:57
↓ 6 callers
Method
Contains
Contains reports whether r is entirely within s.
timespan.go:67
↓ 6 callers
Method
Intersection
Intersection returns both a span corresponding to the non-zero overlap of s and r and a bool indicating whether such an overlap existed. If s and r do
timespan.go:105
↓ 5 callers
Method
Encompass
Encompass returns the minimum span that fully contains both r and s.
timespan.go:72
↓ 5 callers
Method
Gap
Gap returns a span corresponding to the period between s and r. If s and r have a non-zero overlap, a zero span is returned.
timespan.go:92
↓ 4 callers
Method
End
End returns the time instant at the end of s.
timespan.go:37
↓ 4 callers
Method
Offset
Offset returns s with its start time offset by d. It is equivalent to Newspan(s.Start().Add(d), s.Duration()).
timespan.go:123
↓ 4 callers
Method
OffsetDate
OffsetDate returns s with its start time offset by the given years, months, and days. It is equivalent to Newspan(s.Start().AddDate(years, months, day
timespan.go:133
↓ 4 callers
Method
Start
Start returns the time instant at the start of s.
timespan.go:32
↓ 3 callers
Method
IsZero
IsZero reports whether s represents the zero-length span starting and ending on January 1, year 1, 00:00:00 UTC.
timespan.go:117
↓ 3 callers
Method
Overlaps
Overlaps reports whether s and r intersect for a non-zero duration.
timespan.go:143
↓ 3 callers
Function
tmax
tmax returns the later of two time instants.
timespan.go:153
↓ 3 callers
Function
tmin
tmin returns the earlier of two time instants.
timespan.go:161
Function
BenchmarkAfter
(b *testing.B)
timespan_test.go:304
Function
BenchmarkBefore
(b *testing.B)
timespan_test.go:312
Function
BenchmarkBorders
(b *testing.B)
timespan_test.go:406
Function
BenchmarkContains
(b *testing.B)
timespan_test.go:342
Function
BenchmarkContainsTime
(b *testing.B)
timespan_test.go:334
Function
BenchmarkDuration
(b *testing.B)
timespan_test.go:297
Function
BenchmarkEncompass
(b *testing.B)
timespan_test.go:349
Function
BenchmarkEnd
(b *testing.B)
timespan_test.go:290
Function
BenchmarkEqual
(b *testing.B)
timespan_test.go:399
Function
BenchmarkFollows
(b *testing.B)
timespan_test.go:320
Function
BenchmarkGap
(b *testing.B)
timespan_test.go:356
Function
BenchmarkIntersection
(b *testing.B)
timespan_test.go:363
Function
BenchmarkIsZero
(b *testing.B)
timespan_test.go:392
Function
BenchmarkOffset
(b *testing.B)
timespan_test.go:370
Function
BenchmarkOffsetDate
(b *testing.B)
timespan_test.go:378
Function
BenchmarkOverlaps
(b *testing.B)
timespan_test.go:385
Function
BenchmarkPrecedes
(b *testing.B)
timespan_test.go:327
Function
BenchmarkStart
(b *testing.B)
timespan_test.go:283
Function
TestAfter
(t *testing.T)
timespan_test.go:48
Function
TestBefore
(t *testing.T)
timespan_test.go:60
Function
TestBorders
(t *testing.T)
timespan_test.go:150
Function
TestContains
(t *testing.T)
timespan_test.go:183
Function
TestContainsTime
(t *testing.T)
timespan_test.go:168
Function
TestEncompass
(t *testing.T)
timespan_test.go:201
Function
TestEqual
(t *testing.T)
timespan_test.go:126
Function
TestFollows
(t *testing.T)
timespan_test.go:72
Function
TestGap
(t *testing.T)
timespan_test.go:216
Function
TestIntersection
(t *testing.T)
timespan_test.go:232
Function
TestNew
(t *testing.T)
timespan_test.go:32
Function
TestOffset
(t *testing.T)
timespan_test.go:250
Function
TestOffsetDate
(t *testing.T)
timespan_test.go:262
Function
TestPrecedes
(t *testing.T)
timespan_test.go:99