Richard Sargent is giving good advice that you cannot use in Exercism. Your code MUST pass the exercism tests and that means it MUST NOT limit the hour or minute ranges.
On Tue, 1 Sep 2020 at 08:58, Roelof Wobben via Pharo-users < pharo-users@lists.pharo.org> wrote: > > I would argue against that approach. Make it a requirement that a given > API must be used with correct values. > e.g. #hours:minutes: requires hours between 00 and 23 and minutes between > 00 and 59. > > If you want to convert equivalent time values, use a specific API. For > example, many time implementations publicly define a seconds-based API, > such as Time class>>#fromSeconds:. You can do the same with your > implementation with a class-side #fromMinutes: method. (The corresponding > instance methods would be #asSeconds and #asMinutes or something similar.) > > > > Moment, I do not know if I understand you right. > > so I would use the given method and use on the instance another function > that takes care of the converting to or a valid time object or for example > convert it to minutes and on display take care that a valid time is shown. > > Do I understand you right ? > > I send this personal because I cannot send to the mailing list according > to some spam list >