MCPcopy Create free account
hub / github.com/SenseUnit/dumbproxy / parseMonth

Function parseMonth

jsext/dateutil.go:33–62  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

31}
32
33func parseMonth(s string) (time.Month, error) {
34 switch s {
35 case "JAN":
36 return time.January, nil
37 case "FEB":
38 return time.February, nil
39 case "MAR":
40 return time.March, nil
41 case "APR":
42 return time.April, nil
43 case "MAY":
44 return time.May, nil
45 case "JUN":
46 return time.June, nil
47 case "JUL":
48 return time.July, nil
49 case "AUG":
50 return time.August, nil
51 case "SEP":
52 return time.September, nil
53 case "OCT":
54 return time.October, nil
55 case "NOV":
56 return time.November, nil
57 case "DEC":
58 return time.December, nil
59 default:
60 return 0, fmt.Errorf("unable to parse month name: %q", s)
61 }
62}
63
64func wdRange(vm *goja.Runtime, a, b string, gmt bool) goja.Value {
65 a = strings.ToUpper(a)

Callers 1

dateRangeFunction · 0.85

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected