Skip to content

Commit

Permalink
* 27.04 (сб) - рабочий день
Browse files Browse the repository at this point in the history
* 29.04 (пн), 30.04 (вт), 01.05 (ср) - выходные дни
  • Loading branch information
Alexander Amezhenko committed Apr 26, 2024
1 parent f0588fc commit bd3679a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions schedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ type Schedule struct {
func (s Schedule) GetToOfficeText(now time.Time) (string, string) {
prefix := "*Рейсы в офис*\n\n"
//suffix := "\nСубботний рейс в " + s.SaturdayRouteToOffice.String()
suffix := "\nВ выходные дни трансфера нет"
//suffix := "\n8 марта праздничный день - трансфера нет"
//suffix := "\nВ выходные дни трансфера нет"
suffix := "\nПн, Вт, Ср праздничный день - трансфера нет"
//suffix := "\nНовогодние каникулы до 8го января - трансфера нет"

timeAgnosticRoute := prefix + s.WorkDayRouteToOffice.String() + suffix
//if now.Weekday() == time.Saturday || now.Weekday() == time.Sunday {
if now.Weekday() == time.Sunday || now.Weekday() == time.Manday || now.Weekday() == time.Tuesday || now.Weekday() == time.Wednesday {
//if now.Weekday() == time.Friday || now.Weekday() == time.Saturday || now.Weekday() == time.Sunday {
if now.Weekday() == time.Saturday || now.Weekday() == time.Sunday {
//if now.Weekday() == time.Saturday || now.Weekday() == time.Sunday || now.Weekday() == time.Monday {
//if now.Weekday() == time.Saturday || now.Weekday() == time.Sunday || now.Weekday() == time.Monday || now.Weekday() == time.Tuesday {
//if now.Weekday() == time.Thursday || now.Weekday() == time.Friday || now.Weekday() == time.Saturday || now.Weekday() == time.Sunday {
Expand All @@ -40,13 +41,14 @@ func (s Schedule) GetToOfficeText(now time.Time) (string, string) {
func (s Schedule) GetFromOfficeText(now time.Time) (string, string) {
prefix := "*Рейсы из офиса*\n\n"
//suffix := "\nСубботний дежурный в " + s.SaturdayRouteFromOffice.String()
suffix := "\nВ выходные дни трансфера нет"
//suffix := "\n8 марта праздничный день - трансфера нет"
//suffix := "\nВ выходные дни трансфера нет"
suffix := "\nПн, Вт, Ср праздничный день - трансфера нет"
//suffix := "\nНовогодние каникулы до 8го января - трансфера нет"

timeAgnosticRoute := prefix + s.WorkDayRouteFromOffice.String() + suffix
//if now.Weekday() == time.Saturday || now.Weekday() == time.Sunday {
if now.Weekday() == time.Sunday || now.Weekday() == time.Manday || now.Weekday() == time.Tuesday || now.Weekday() == time.Wednesday {
//if now.Weekday() == time.Friday || now.Weekday() == time.Saturday || now.Weekday() == time.Sunday {
if now.Weekday() == time.Saturday || now.Weekday() == time.Sunday {
//if now.Weekday() == time.Saturday || now.Weekday() == time.Sunday || now.Weekday() == time.Monday {
//if now.Weekday() == time.Saturday || now.Weekday() == time.Sunday || now.Weekday() == time.Monday || now.Weekday() == time.Tuesday {
//if now.Weekday() == time.Thursday || now.Weekday() == time.Friday || now.Weekday() == time.Saturday || now.Weekday() == time.Sunday {
Expand Down

0 comments on commit bd3679a

Please sign in to comment.