package kumite import "time" func CheckWorkHours(dateTime time.Time) bool { return dateTime.Weekday() != time.Thursday && dateTime.Weekday() != time.Sunday && dateTime.Hour() >= 8 && dateTime.Hour() < 18 }
- package kumite
import ( "time"; "math" )func CheckWorkHours(dateTime time.Time) bool {if math.Abs(float64(dateTime.Weekday()) - 3) == 3 { return false }return 8 <= dateTime.Hour() && dateTime.Hour() < 18}- import "time"
- func CheckWorkHours(dateTime time.Time) bool {
- return dateTime.Weekday() != time.Thursday && dateTime.Weekday() != time.Sunday && dateTime.Hour() >= 8 && dateTime.Hour() < 18 }
package kumite import ( "time"; "math" ) func CheckWorkHours(dateTime time.Time) bool { if math.Abs(float64(dateTime.Weekday()) - 3) == 3 { return false } return 8 <= dateTime.Hour() && dateTime.Hour() < 18 }
- package kumite
import "time"import "math"- import ( "time"; "math" )
- func CheckWorkHours(dateTime time.Time) bool {
if math.Abs(float64(dateTime.Weekday()) - 3) == 3 {return false}hour := dateTime.Hour()return 8 <= hour && hour < 18- if math.Abs(float64(dateTime.Weekday()) - 3) == 3 { return false }
- return 8 <= dateTime.Hour() && dateTime.Hour() < 18
- }