This commit is contained in:
Владимир Фёдоров 2023-02-10 15:43:13 +07:00
parent 179c2eaf6b
commit d189be8e44
2 changed files with 1 additions and 9 deletions

View File

@ -14,25 +14,18 @@ func GetTranslatedWeekday(date time.Time) string {
switch date.Weekday() { switch date.Weekday() {
case time.Monday: case time.Monday:
return "Понедельник" return "Понедельник"
case time.Tuesday: case time.Tuesday:
return "Вторник" return "Вторник"
case time.Wednesday: case time.Wednesday:
return "Среда" return "Среда"
case time.Thursday: case time.Thursday:
return "Четверг" return "Четверг"
case time.Friday: case time.Friday:
return "Пятница" return "Пятница"
case time.Saturday: case time.Saturday:
return "Суббота" return "Суббота"
case time.Sunday: case time.Sunday:
return "Воскресенье" return "Воскресенье"
default: default:
return "" return ""
} }

View File

@ -70,8 +70,7 @@ func LessonsMessage(schedule []parser.Lesson, prefix, emptyText string) string {
l.Name = strings.ReplaceAll(l.Name, "()", "") l.Name = strings.ReplaceAll(l.Name, "()", "")
l.Name = strings.ReplaceAll(l.Name, l.TimeStart.Format("15:04"), "") l.Name = strings.ReplaceAll(l.Name, l.TimeStart.Format("15:04"), "")
l.Name = strings.TrimSpace(l.Name) l.Name = strings.TrimSpace(l.Name)
s += fmt.Sprintf("%s %s (%s)\n"+ s += fmt.Sprintf("%s %s (%s)\n%s\n", l.TimeMsg, l.Name, l.Place, l.User)
"%s \n", l.TimeMsg, l.Name, l.Place, l.User)
} }
if prefix != "" { if prefix != "" {
s += "\n" + s += "\n" +