Timeline for Split an array of items into several arrays, given a condition
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 1, 2019 at 14:32 | comment | added | Maryannah | I have posted this question on SOF and they made the same statement, to which I replied that my case is very specific and I actually don't need genericity, because the data that is one week old gets deleted. I have and will always have 3 arrays, so I don't need to make it generic at all. But your answer is nicely thought indeed, so have my upvote ! | |
Mar 1, 2019 at 13:58 | comment | added | Oh My Goodness | well you can factor out some of the calculations with an array of days - see my code. It's only a little shorter than your version, but it will scale up to many intervals with hardly any increase in code length. | |
Mar 1, 2019 at 13:34 | comment | added | Maryannah | As said on your previous comment, I just wrote that fast and didn't really cared about all that. I was more focused on the array operators | |
Mar 1, 2019 at 13:18 | history | answered | Oh My Goodness | CC BY-SA 4.0 |