File tree Expand file tree Collapse file tree 1 file changed +0
-24
lines changed
Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Original file line number Diff line number Diff line change 11package github
22
33import (
4- "fmt"
5- "time"
6-
74 "github.com/google/go-github/v79/github"
85)
96
@@ -261,24 +258,3 @@ func convertToMinimalBranch(branch *github.Branch) MinimalBranch {
261258 Protected : branch .GetProtected (),
262259 }
263260}
264-
265- // parseISOTimestamp parses an ISO 8601 timestamp string
266- func parseISOTimestamp (timestamp string ) (time.Time , error ) {
267- if timestamp == "" {
268- return time.Time {}, fmt .Errorf ("empty timestamp" )
269- }
270-
271- // Try RFC3339 format (standard ISO 8601 with time)
272- t , err := time .Parse (time .RFC3339 , timestamp )
273- if err == nil {
274- return t , nil
275- }
276-
277- // Try simple date format (YYYY-MM-DD)
278- t , err = time .Parse ("2006-01-02" , timestamp )
279- if err == nil {
280- return t , nil
281- }
282-
283- return time.Time {}, fmt .Errorf ("invalid timestamp format: %s" , timestamp )
284- }
You can’t perform that action at this time.
0 commit comments