MCPcopy Index your code
hub / github.com/coder/coder / TemplateAutostopRequirementEpoch

Function TemplateAutostopRequirementEpoch

coderd/schedule/template.go:17–22  ·  view source on GitHub ↗
(loc *time.Location)

Source from the content-addressed store, hash-verified

15const MaxTemplateAutostopRequirementWeeks = 16
16
17func TemplateAutostopRequirementEpoch(loc *time.Location) time.Time {
18 // The "first week" starts on January 2nd, 2023, which is the first Monday
19 // of 2023. All other weeks are counted using modulo arithmetic from that
20 // date.
21 return time.Date(2023, time.January, 2, 0, 0, 0, 0, loc)
22}
23
24// DaysOfWeek intentionally starts on Monday as opposed to Sunday so the weekend
25// days are contiguous in the bitmap. This matters greatly when doing restarts

Callers 2

WeeksSinceEpochFunction · 0.85
GetMondayOfWeekFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected