Closed RemiAWE closed 8 years ago
There isn't a way to do that now. I'd accept a PR for a function called divideEqually(numberOfParts)
I added this in 03b055d and will release it soon. In the meantime, it turns out that it's really simple, so you can do it yourself. This splits a range into 5 equal parts, leaving off the remainder (at most 4 milliseconds):
var n = 5
range.split(range.length() / n, 'ms').slice(0, n)
Hello, thank you for this excellent library.
Is there a way to split a dateRange in n parts ? Actually the
split()
function split only by a time or duration but it cannot split by number like.split(5)