Two tasks are failing one test case each. Would appreciate if someone could review the code and tell me where I went wrong -
// HasPassed returns whether a date has passed.
func HasPassed(date string) bool {
checkTime, _ := time.Parse(“July 25, 2019 13:45:00”, date)
return checkTime.Before(time.Now())
}
booking_up_for_beauty_test.go:38: HasPassed(December 9, 2112 11:59:59) = ‘true’, want ‘false’
// IsAfternoonAppointment returns whether a time is in the afternoon.
func IsAfternoonAppointment(date string) bool {
aptTime, _ := time.Parse(“Thursday, July 25, 2019 13:45:00”, date)
hour := aptTime.Hour()
return hour >= 12 && hour < 18
}
booking_up_for_beauty_test.go:56: IsAfternoonAppointment(Friday, March 8, 1974 12:02:02) = ‘false’, want ‘true’