Skip to content

Commit

Permalink
fix date format for when vat rates change halfway through the year
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyvankooten committed Sep 10, 2018
1 parent 4b434a3 commit fc6e6c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rates.go
Expand Up @@ -115,7 +115,7 @@ func FetchRates() ([]CountryRates, error) {
for idx1, cr := range apiResponse.Rates {
for idx2, crp := range cr.Periods {
crp.EffectiveFromStr = strings.Replace(crp.EffectiveFromStr, "0000-", "2000-", 1)
apiResponse.Rates[idx1].Periods[idx2].EffectiveFrom, _ = time.Parse("2006-01-01", crp.EffectiveFromStr)
apiResponse.Rates[idx1].Periods[idx2].EffectiveFrom, _ = time.Parse("2006-01-02", crp.EffectiveFromStr)
}
}

Expand Down

0 comments on commit fc6e6c8

Please sign in to comment.