Skip to content

Commit

Permalink
Align to coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
roughy committed Apr 25, 2019
1 parent fcd6391 commit 78f526b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions domain/datetime.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ type LocalDate struct {
time time.Time
}

func (d *LocalDate) Before(b LocalDate) bool {
return d.time.Before(b.time)
}

func NewLocalDate(t time.Time) LocalDate {
return LocalDate{time: t}
}
Expand All @@ -41,6 +37,10 @@ func (d LocalDate) Add(years int, months int, days int) LocalDate {
return LocalDate{time: d.time.AddDate(years, months, days)}
}

func (d LocalDate) Before(b LocalDate) bool {
return d.time.Before(b.time)
}

func (d LocalDate) String() string {
return d.time.Format(ISO8601)
}
Expand All @@ -54,7 +54,7 @@ func NewMinutes(minutes int) Minutes {
}

func NewMinutesFromHours(hours int) Minutes {
return Minutes{duration: time.Duration(hours*60) * time.Minute}
return Minutes{duration: time.Duration(hours) * time.Hour}
}

func ParseMinutes(s string) (Minutes, error) {
Expand Down

0 comments on commit 78f526b

Please sign in to comment.