Skip to content

Commit

Permalink
remove: time/timeutil: remove ParseDurationInfoStrings() in favor…
Browse files Browse the repository at this point in the history
… of `DurationInfoString{}`
  • Loading branch information
grokify committed Sep 17, 2023
1 parent 15c5167 commit 616876b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion time/timeutil/duration_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func NewDurationInfo(d time.Duration, daysPerWeek, hoursPerDay float32) Duration
return dinfo
}

/*
// ParseDurationInfoStrings returns a DurationInfo object for various time units.
func ParseDurationInfoStrings(wk, dy, hr, mn, sc, ms, us, ns string) (DurationInfo, error) {
dur := DurationInfo{}
Expand Down Expand Up @@ -146,6 +147,7 @@ func ParseDurationInfoStrings(wk, dy, hr, mn, sc, ms, us, ns string) (DurationIn
}
return dur, nil
}
*/

// Duration returns a `time.Duration` struct. Params for `hoursPerDay` and `daysPerWeek` are
// used for atlernate values such as working hours per day and working days per week, e.g.
Expand Down Expand Up @@ -236,7 +238,7 @@ func FormatDurationInfoMinSec(di DurationInfo) string {

// DurationInfoString represets a set of time duration data. It is useful for converting
// parsed time data into a `time.Duration` struct. `DaysPerWeek` and `HoursPerDay` are provided
// as overrids to standard value of 7 and 24 in the case of business context, e.g. 5 days
// as overrides to standard value of 7 and 24 in the case of business context, e.g. 5 days
// per week and 8 hours per day.
type DurationInfoString struct {
DaysPerWeek float32
Expand Down

0 comments on commit 616876b

Please sign in to comment.