diff --git a/Socialmetrica.package/Integer.extension/instance/periodsSince.until..st b/Socialmetrica.package/Integer.extension/instance/periodsSince.until..st new file mode 100644 index 0000000..9f71e5d --- /dev/null +++ b/Socialmetrica.package/Integer.extension/instance/periodsSince.until..st @@ -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 \ No newline at end of file diff --git a/Socialmetrica.package/Integer.extension/properties.json b/Socialmetrica.package/Integer.extension/properties.json new file mode 100644 index 0000000..a8c2b93 --- /dev/null +++ b/Socialmetrica.package/Integer.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name" : "Integer" +} \ No newline at end of file