diff --git a/Backend/helper/time.go b/Backend/helper/time.go index 643072e..0bd5551 100644 --- a/Backend/helper/time.go +++ b/Backend/helper/time.go @@ -20,6 +20,11 @@ func IsWeekend(ts time.Time) bool { return ts.Weekday() == time.Saturday || ts.Weekday() == time.Sunday } +func GetKW(t time.Time) int { + _, kw := t.ISOWeek() + return kw +} + // Converts duration to string func FormatDuration(d time.Duration) string { hours := int(d.Abs().Hours())