Ändere Wochenfeld von Auswahl "Jede/gerade Vorlesungswochen/ungerade Vorlesungswochen" zu Freitextfeld mit Vorschlag.
Closes #28
This commit is contained in:
parent
5e954ca751
commit
deced3e596
10 changed files with 35 additions and 41 deletions
|
@ -5,7 +5,7 @@ import (
|
|||
)
|
||||
|
||||
type Date struct {
|
||||
Week int // Set whether the date is all weeks (0), odd weeks (1) or even weeks (2).
|
||||
Week string
|
||||
Day int
|
||||
Hour int
|
||||
Minute int
|
||||
|
@ -54,7 +54,7 @@ func DateLess(first Date, second Date) bool {
|
|||
func GetEndDate(date Date, duration int, ignoreWeek bool) Date {
|
||||
var endDate Date
|
||||
if ignoreWeek {
|
||||
endDate = Date{0, date.Day, date.Hour, date.Minute} // deep copy
|
||||
endDate = Date{"", date.Day, date.Hour, date.Minute} // deep copy
|
||||
} else {
|
||||
endDate = Date{date.Week, date.Day, date.Hour, date.Minute}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue