Skip to content

Commit

Permalink
Recategorize some methods in ZTimestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Van Caekenberghe committed Mar 15, 2023
1 parent 48b1f76 commit 8288d41
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions repository/ZTimestamp-Core/ZTimestamp.class.st
Expand Up @@ -433,21 +433,21 @@ ZTimestamp >> - operand [
^ operand subtractFromTimestamp: self
]

{ #category : #testing }
{ #category : #comparing }
ZTimestamp >> < aZTimestamp [
"Answer true when aZTimestamp is strictly later than me, false otherwise.
Part of the Magnitude protocol"

^ jdn = aZTimestamp julianDayNumber
ifTrue: [ ns < aZTimestamp nanosecondsSinceMidnight ]
ifFalse: [ jdn < aZTimestamp julianDayNumber ]
]

{ #category : #testing }
{ #category : #comparing }
ZTimestamp >> = aZTimestamp [
"Answer true when aZTimestamp equals the receiver, false otherwise.
Part of the Magnitude protocol"

self == aZTimestamp ifTrue: [ ^ true ].
self class = aZTimestamp class ifFalse: [ ^ false ].
^ jdn = aZTimestamp julianDayNumber
Expand Down Expand Up @@ -598,11 +598,11 @@ ZTimestamp >> format: formatSpecification on: stream [
format: self on: stream
]

{ #category : #hash }
{ #category : #comparing }
ZTimestamp >> hash [
"Return an Integer hash value for the receiver.
Part of the Magnitude protocl"

^ jdn hashMultiply bitXor: ns
]

Expand Down

0 comments on commit 8288d41

Please sign in to comment.