Socialmetrica/Socialmetrica.package/TweetsCollection.class/instance/timeSpansOf..st

12 lines
333 B
Smalltalk
Raw Normal View History

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.