Skip to content

Commit

Permalink
Made into a 1-liner
Browse files Browse the repository at this point in the history
  • Loading branch information
COMTOP1 committed Jan 2, 2025
1 parent a10a56f commit 96d4bce
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions services/campus/period.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ func (c *Campuser) GetWeek(ctx context.Context, t time.Time) (Week, error) {
return Week{}, fmt.Errorf("failed to get teaching period: %w", err)
}

// TODO: Need to convert time from what's given to
// that times Monday and return a better week no.
// TODO: Need to convert time from what's given to that times Monday and return a better week no.
w.WeekNo = (int(t.Sub(w.TeachingPeriod.Start).Hours()) / 24 / 7) + 1

return w, nil
Expand Down

0 comments on commit 96d4bce

Please sign in to comment.