mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-07 04:09:15 +02:00
feat:#5 added free rooms api endpoint
This commit is contained in:
@@ -45,3 +45,9 @@ func HashString(s string) string {
|
||||
hashInBytes := hash.Sum(nil)
|
||||
return hex.EncodeToString(hashInBytes)
|
||||
}
|
||||
|
||||
func SeperateRoomString(rooms string) []string {
|
||||
return strings.FieldsFunc(rooms, IsSeparator(
|
||||
[]rune{',', '\t', '\n', '\r', ';', ' ', '\u00A0'}),
|
||||
)
|
||||
}
|
||||
|
7
backend/service/functions/time/parse.go
Normal file
7
backend/service/functions/time/parse.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package time
|
||||
|
||||
import "time"
|
||||
|
||||
func ParseTime(timeString string) (time.Time, error) {
|
||||
return time.Parse("2006-01-02T15:04:05Z", timeString)
|
||||
}
|
Reference in New Issue
Block a user