get spesialis
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package utils
|
||||
|
||||
import "log"
|
||||
import (
|
||||
"log"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Function to convert Kode to ID
|
||||
func KodeToIDConverter(kode string, kodeDokter map[string]int) int {
|
||||
@@ -15,3 +18,21 @@ func HfisCodeToIDConverter(kode int, kodeDokter map[int]string) string {
|
||||
id := kodeDokter[kode]
|
||||
return id
|
||||
}
|
||||
|
||||
func ConvertDay(day string) string {
|
||||
dayTranslations := map[string]string{
|
||||
"sunday": "MINGGU",
|
||||
"monday": "SENIN",
|
||||
"tuesday": "SELASA",
|
||||
"wednesday": "RABU",
|
||||
"thursday": "KAMIS",
|
||||
"friday": "JUMAT",
|
||||
"saturday": "SABTU",
|
||||
}
|
||||
|
||||
dayLower := strings.ToLower(day)
|
||||
if translatedDay, exists := dayTranslations[dayLower]; exists {
|
||||
return translatedDay
|
||||
}
|
||||
return day
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user