Creating time spans division for tweets collection.
This commit is contained in:
parent
2de7cf1d11
commit
1f081f58cf
@ -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.
|
Loading…
Reference in New Issue
Block a user