MCPcopy Index your code
hub / github.com/TruthHun/BookStack / getYear

Function getYear

models/base.go:269–274  ·  view source on GitHub ↗
(t time.Time)

Source from the content-addressed store, hash-verified

267}
268
269func getYear(t time.Time) (start, end string) {
270 month := time.Date(t.Year(), 1, 1, 0, 0, 0, 0, time.Local)
271 start = month.Format(dateFormat)
272 end = month.AddDate(0, 12, 0).Add(-24 * time.Hour).Format(dateFormat)
273 return
274}
275
276func getMonth(t time.Time) (start, end string) {
277 month := time.Date(t.Year(), t.Month(), 1, 0, 0, 0, 0, time.Local)

Callers 1

getTimeRangeFunction · 0.85

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected