Skip to content

Commit

Permalink
Fix deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
frozzare committed Jul 3, 2024
1 parent e4f2455 commit e64e73f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions personnummer.v
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fn validate_date(year string, month string, day string) bool {
m := month.int()
dd := day.int()

d := time.new_time(time.Time{
d := time.new(time.Time{
year: y
month: m
day: dd
Expand Down Expand Up @@ -130,7 +130,7 @@ pub fn (p Personnummer) get_date() time.Time {
age_day = (age_day.int() - 60).str()
}

return time.new_time(time.Time{
return time.new(time.Time{
year: p.full_year.int()
month: p.month.int()
day: age_day.int()
Expand Down
10 changes: 5 additions & 5 deletions personnummer_test.v
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ struct List {
separated_format string
separated_long string
valid bool
ltype string [json: 'type']
is_male bool [json: isMale]
is_female bool [json: isFemale]
ltype string @[json: 'type']
is_male bool @[json: isMale]
is_female bool @[json: isFemale]
}

fn (l List) get_format(s string) string {
Expand Down Expand Up @@ -145,7 +145,7 @@ fn test_personnummer_date() {
age_day = age_day - 60
}

date := time.new_time(time.Time{
date := time.new(time.Time{
year: year
month: month
day: age_day
Expand Down Expand Up @@ -181,7 +181,7 @@ fn test_personnummer_age() {
}

now := time.now()
date := time.new_time(time.Time{
date := time.new(time.Time{
year: year
month: month
day: age_day
Expand Down

0 comments on commit e64e73f

Please sign in to comment.