<div dir="ltr"><div>Hi Chris,</div><div>I would just create a Duration class>>microSeconds: and delegate</div><div>There is also minutes hours days weeks which require repackaging<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 15 mai 2019 à 21:14, Chris Muller <<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">But it's not ready yet.  Number>>#microSeconds is wrong.  I'd like it<br>
to be consistent with #nanoSeconds and #milliSeconds in the way it<br>
truncates...<br>
<br>
Would you like to take a crack at that?  Otherwise, please give me a day or two.<br>
<br>
Thanks,<br>
  Chris<br>
<br>
<br>
On Wed, May 15, 2019 at 10:31 AM Chris Cunningham<br>
<<a href="mailto:cunningham.cb@gmail.com" target="_blank">cunningham.cb@gmail.com</a>> wrote:<br>
><br>
> This is a better fix than mine.<br>
> Passes tests.<br>
> My code works with this (and without my other change - i.e., reverted my alterations).<br>
><br>
> +1<br>
><br>
> On Tue, May 14, 2019 at 8:43 PM Chris Muller <<a href="mailto:asqueaker@gmail.com" target="_blank">asqueaker@gmail.com</a>> wrote:<br>
>><br>
>> Dave had a #FIXME marker in #utcOffset:, it's the one that was deviant<br>
>> from the prior behavior.  #asLocal is good.<br>
>><br>
>> Also included fix to move Duration creating convenience methods to<br>
>> this package with a pair of microSeconds accessors included.  (woops,<br>
>> I just saw I forgot to truncate).<br>
>><br>
>><br>
>><br>
>> On Tue, May 14, 2019 at 10:33 PM <<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>> wrote:<br>
>> ><br>
>> > Chris Muller uploaded a new version of Chronology-Core to project The Inbox:<br>
>> > <a href="http://source.squeak.org/inbox/Chronology-Core-cmm.45.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/inbox/Chronology-Core-cmm.45.mcz</a><br>
>> ><br>
>> > ==================== Summary ====================<br>
>> ><br>
>> > Name: Chronology-Core-cmm.45<br>
>> > Author: cmm<br>
>> > Time: 14 May 2019, 10:33:41.936949 pm<br>
>> > UUID: 6355a6a7-febb-4ac8-a024-bf13bd00b8dc<br>
>> > Ancestors: Chronology-Core-nice.44<br>
>> ><br>
>> > - Make #utcOffset: match the prior behavior.<br>
>> > - Move Duration convenience constructors in Number to this package.<br>
>> ><br>
>> > =============== Diff against Chronology-Core-nice.44 ===============<br>
>> ><br>
>> > Item was changed:<br>
>> >   ----- Method: DateAndTime>>utcOffset: (in category 'squeak protocol') -----<br>
>> > + utcOffset: anOffset<br>
>> > +       "Answer a DateAndTime equivalent to the receiver but offset from UTC by anOffset"<br>
>> > +       ^ self class<br>
>> > +               utcMicroseconds: utcMicroseconds<br>
>> > +               offset: anOffset asDuration asSeconds!<br>
>> > - utcOffset: anOffset<br>
>> > -<br>
>> > -       "Answer a <DateAndTime> equivalent to the receiver but offset from UTC by anOffset"<br>
>> > -<br>
>> > -       self flag: #FIXME. "check the definition of this and of #offset:"<br>
>> > -       ^self utcMicroseconds: utcMicroseconds offset: anOffset asDuration asSeconds<br>
>> > - !<br>
>> ><br>
>> > Item was added:<br>
>> > + ----- Method: Number>>microSecond (in category '*chronology-core') -----<br>
>> > + microSecond<br>
>> > +       ^ self sign microSeconds!<br>
>> ><br>
>> > Item was added:<br>
>> > + ----- Method: Number>>microSeconds (in category '*chronology-core') -----<br>
>> > + microSeconds<br>
>> > +       ^ Duration nanoSeconds: self * 1000!<br>
>> ><br>
>> > Item was added:<br>
>> > + ----- Method: Number>>milliSecond (in category '*chronology-core') -----<br>
>> > + milliSecond<br>
>> > +<br>
>> > +       ^ self sign milliSeconds<br>
>> > + !<br>
>> ><br>
>> > Item was added:<br>
>> > + ----- Method: Number>>milliSeconds (in category '*chronology-core') -----<br>
>> > + milliSeconds<br>
>> > +<br>
>> > +       ^ Duration milliSeconds: self<br>
>> > + !<br>
>> ><br>
>> > Item was added:<br>
>> > + ----- Method: Number>>nanoSecond (in category '*chronology-core') -----<br>
>> > + nanoSecond<br>
>> > +<br>
>> > +       ^ self sign nanoSeconds<br>
>> > + !<br>
>> ><br>
>> > Item was added:<br>
>> > + ----- Method: Number>>nanoSeconds (in category '*chronology-core') -----<br>
>> > + nanoSeconds<br>
>> > +<br>
>> > +       ^ Duration nanoSeconds: self.!<br>
>> ><br>
>> > Item was added:<br>
>> > + ----- Method: Number>>second (in category '*chronology-core') -----<br>
>> > + second<br>
>> > +<br>
>> > +       ^ self sign seconds<br>
>> > + !<br>
>> ><br>
>> > Item was added:<br>
>> > + ----- Method: Number>>seconds (in category '*chronology-core') -----<br>
>> > + seconds<br>
>> > +<br>
>> > +       ^ Duration seconds: self!<br>
>> ><br>
>> ><br>
>><br>
><br>
<br>
</blockquote></div>