Skip to content

Commit

Permalink
Include week number in increases command
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Mar 25, 2024
1 parent ec41106 commit 00b44c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions cmd/increases.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ func runIncreasesE(cmd *cobra.Command, args []string) error {
res = prettyJSON.String()
}

yr, isoWeek := startDate.ISOWeek()
fmt.Printf("Start date: %s\tWeek: %d (%d)\n",
startDate.Format("2006-01-02"),
isoWeek,
yr)
fmt.Println(res)

return nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (c *Client) GetBuildIncreases(patStr string, owner string, startDate time.T
q.Set("owner", owner)
}
q.Add("startDate", startDate.Format("2006-01-02"))
log.Printf("Date: %s", startDate.Format("2006-01-02"))

u.RawQuery = q.Encode()

req, err := http.NewRequest(http.MethodGet, u.String(), nil)
Expand Down

0 comments on commit 00b44c0

Please sign in to comment.