On 29 April 2013 07:39, stephane ducasse <stephane.duca...@free.fr> wrote: > > On Apr 28, 2013, at 11:19 PM, Nicolas Cellier > <nicolas.cellier.aka.n...@gmail.com> wrote: > > \\ returns a positive remainder. > example: > -1 \\ 86400 -> 86399 > -1 // 86400 -> -1 > > > Yes I saw that and now I realized I understand it. > But funnily I did not notice the difference between the use of // and \\ > i always confuse them.
> So the jdn is decremented and seconds are correctly normalized. > > > > 2013/4/28 stephane ducasse <stephane.duca...@free.fr> >> >> Nicolas >> >> I read all the slice and I like it (even if they are place where I do not >> get fully it :). >> I'm dead. So may be this is obvious but I do not understand the or: logic >> If the seconds is negative I do not understand what is happening. >> >> >> normalizeSecondsAndNanos >> (NanosInSecond <= nanos or: [ nanos < 0 ]) >> ifTrue: [ >> seconds := seconds + (nanos // NanosInSecond). >> nanos := nanos \\ NanosInSecond]. >> (SecondsInDay <= seconds or: [ seconds < 0 ]) >> ifTrue: [ >> julianDayNumber := julianDayNumber + (seconds // SecondsInDay). >> seconds := seconds \\ SecondsInDay]. >> >> Stef >> >> >> >> On Apr 28, 2013, at 7:03 PM, Nicolas Cellier >> <nicolas.cellier.aka.n...@gmail.com> wrote: >> >> Yes, this was valid when jdn, seconds and nanos where maintained in local >> time... >> >> >> 2013/4/28 Paul DeBruicker <pdebr...@gmail.com> >>> >>> Nicolas Cellier wrote >>> > What I find strange: >>> > - #hash uses the offset... Why ??? >>> >>> Maybe because of this: >>> http://forum.world.st/true-hash-tp4621497p4624623.html >>> >>> which you fixed here: >>> >>> >>> See http://forum.world.st/true-hash-tp4621497p4624706.html >>> >>> >>> >>> >>> >>> -- >>> View this message in context: >>> http://forum.world.st/Trying-to-understand-DateAndTime-tp4683997p4684123.html >>> Sent from the Pharo Smalltalk mailing list archive at Nabble.com. >>> >> >> > > -- Best regards, Igor Stasenko.