fix
This commit is contained in:
parent
179c2eaf6b
commit
d189be8e44
|
@ -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 ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -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" +
|
||||||
|
|
Loading…
Reference in New Issue