11 lines
336 B
Smalltalk
11 lines
336 B
Smalltalk
*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 |