Socialmetrica/Socialmetrica.package/NitterUser.class/instance/tweetsDivisionsByWeeks.st

10 lines
269 B
Smalltalk
Raw Normal View History

accessing
tweetsDivisionsByWeeks
| weeks floor divisions |
weeks := ((self newestTweet created - self oldestTweet created) days / 7).
floor := weeks floor.
(weeks - floor) > 0.4
ifTrue: [ divisions := floor ]
ifFalse: [ divisions := floor + 1 ].
^ divisions