Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:frozzare/go-personnummer
Browse files Browse the repository at this point in the history
  • Loading branch information
frozzare committed Apr 20, 2015
2 parents 70463e0 + 199c437 commit d627dec
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions personnummer.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ func Valid(str interface{}) bool {
year := match[2]
month := match[3]
day := match[4]
sep := match[5]
num := match[6]
check := match[7]

Expand All @@ -105,10 +104,6 @@ func Valid(str interface{}) bool {
year = year[2:]
}

if len(sep) == 0 {
sep = "-"
}

c, _ := strconv.Atoi(check)

valid := luhn(year+month+day+num) == c && len(check) != 0
Expand Down

0 comments on commit d627dec

Please sign in to comment.