Calculating time subperiods for tweets histogram.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-04-15 07:36:53 -05:00
parent 0da5c06527
commit 382dcd9954
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,11 @@
*Socialmetrica
periodsSince: startingDate until: endingDate
| endings subperiodDuration |
subperiodDuration := (endingDate - startingDate) / self.
endings := OrderedCollection new.
endings add: startingDate.
1 to: self do: [ :i | | ending |
ending := startingDate + (subperiodDuration * i).
endings add: ending.
].
^ endings

View File

@ -0,0 +1,3 @@
{
"name" : "Integer"
}