Skip to content

Commit

Permalink
zero pad dates (#328)
Browse files Browse the repository at this point in the history
Signed-off-by: Asra Ali <[email protected]>
  • Loading branch information
asraa authored Apr 5, 2021
1 parent f15a6bf commit 8a5f9a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cron/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type Repository struct {
}

func main() {
fileName := fmt.Sprintf("%d-%d-%d.json", time.Now().Month(), time.Now().Day(), time.Now().Year())
fileName := fmt.Sprintf("%02d-%02d-%d.json", time.Now().Month(), time.Now().Day(), time.Now().Year())
result, err := os.Create(fileName)
if err != nil {
panic(err)
Expand Down

0 comments on commit 8a5f9a8

Please sign in to comment.