Creating tweets collections split by days.

This commit is contained in:
ruidajo 2022-06-16 20:44:15 -05:00
parent 6548c70291
commit 215e83d66e
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,11 @@
accessing
splitByDays
| response spans |
response := Dictionary new.
self timeSpansByDays doWithIndex: [ :span :i |
response
at: span asDate asString
put: (self select: [ :message | span includes: (message created asDateAndTime)])
].
^ response

View File

@ -0,0 +1,5 @@
accessing
timeSpansByDays
^ (Timespan starting: self oldest created ending: self newest created)
dates asOrderedCollection collect: [ :date | Timespan starting: date ending: date + 24 hours]