Skip to content

Commit

Permalink
Merge pull request #9 from Keinberger/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
Keinberger authored Jun 1, 2022
2 parents ee3e33c + 7b52acd commit 5575149
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions scrape_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,17 @@ func TestScrape(t *testing.T) {
y, m, d := vars[0].(time.Time).Date()
var mon string
mo := strconv.Itoa(int(m))
day := strconv.Itoa(int(d))
if len(mo) == 1 {
for i := 0; i < len(mo); i++ {
mon += "0"
}
mon += "0"
}
mon += strconv.Itoa(int(m))
return strings.ReplaceAll(str, numericalDateStr, strconv.Itoa(y)+"/"+mon+"/"+strconv.Itoa(d))
if len(day) == 1 {
day = "0"
day += strconv.Itoa(int(d))
}
fmt.Println(strings.ReplaceAll(str, numericalDateStr, strconv.Itoa(y)+"/"+mon+"/"+day))
return strings.ReplaceAll(str, numericalDateStr, strconv.Itoa(y)+"/"+mon+"/"+day)
}

expected := " The Front Page"
Expand Down

0 comments on commit 5575149

Please sign in to comment.