mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-03 02:09:15 +02:00
feat:#31 updated database start end to date
This commit is contained in:
@@ -4,7 +4,8 @@ import "time"
|
||||
|
||||
func GetDateFromWeekNumber(year int, weekNumber int, dayName string) (time.Time, error) {
|
||||
// Create a time.Date for the first day of the year
|
||||
firstDayOfYear := time.Date(year, time.January, 1, 0, 0, 0, 0, time.UTC)
|
||||
europeTime, _ := time.LoadLocation("Europe/Berlin")
|
||||
firstDayOfYear := time.Date(year, time.January, 1, 0, 0, 0, 0, europeTime)
|
||||
|
||||
// Calculate the number of days to add to reach the desired week
|
||||
daysToAdd := time.Duration((weekNumber-1)*7) * 24 * time.Hour
|
||||
|
Reference in New Issue
Block a user