Creating time spans division for tweets collection.

This commit is contained in:
ruidajo 2022-04-15 18:53:06 -05:00
parent 2de7cf1d11
commit 1f081f58cf

View File

@ -0,0 +1,12 @@
accessing
timeSpansOf: integerDivisions
| borders response |
borders := integerDivisions
periodsSince: self oldest created
until: self newest created.
response := OrderedCollection new.
1 to: integerDivisions do: [ :i |
response add: ((borders at: i) asDateAndTime to: (borders at: i + 1) asDateAndTime)
].
^ response.