MCPcopy Create free account
hub / github.com/github/gh-aw / isAMPMToken

Function isAMPMToken

pkg/parser/schedule_time_utils.go:33–40  ·  view source on GitHub ↗

isAMPMToken checks if a token is an AM/PM indicator

(token string)

Source from the content-addressed store, hash-verified

31
32// isAMPMToken checks if a token is an AM/PM indicator
33func isAMPMToken(token string) bool {
34 switch strings.ToLower(token) {
35 case "am", "pm":
36 return true
37 default:
38 return false
39 }
40}
41
42// normalizeTimeTokens combines time tokens into a normalized string
43// Handles time, AM/PM, and timezone tokens

Callers 6

normalizeTimeTokensFunction · 0.85
TestIsAMPMTokenFunction · 0.85
extractTimeMethod · 0.85
extractTimeAfterMethod · 0.85

Calls 1

ToLowerMethod · 0.80

Tested by 1

TestIsAMPMTokenFunction · 0.68