Instead of using monthly hold times, use increments of 1 day for the pin duration.
Use time.* Types for Validation
At the moment we have a mixed bag of validating hold times, consisting of either time.* types or holdTimeInMonths int types. Instead we should have the user supply the number of days they want to pin for, and then immediately convert this to a time.Time type using time.Now().AddDate(0, 0, holdTimeInDays). We then pass this time.Time object around for manipulation, validation, etc..
As noted by @xiegeo in https://github.com/RTradeLtd/Temporal/pull/467#discussion_r405226077, there is room for refinement when it comes to how we handle hold times, and validation of them.
Day Long Increments Of Hold Time
Instead of using monthly hold times, use increments of
1 day
for the pin duration.Use
time.*
Types for ValidationAt the moment we have a mixed bag of validating hold times, consisting of either
time.*
types orholdTimeInMonths int
types. Instead we should have the user supply the number of days they want to pin for, and then immediately convert this to atime.Time
type usingtime.Now().AddDate(0, 0, holdTimeInDays)
. We then pass thistime.Time
object around for manipulation, validation, etc..