diff options
Diffstat (limited to 'npm_assets/node_modules/luxon/src/interval.js')
| -rw-r--r-- | npm_assets/node_modules/luxon/src/interval.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/npm_assets/node_modules/luxon/src/interval.js b/npm_assets/node_modules/luxon/src/interval.js index f2cfce8..71273fd 100644 --- a/npm_assets/node_modules/luxon/src/interval.js +++ b/npm_assets/node_modules/luxon/src/interval.js @@ -340,15 +340,16 @@ export default class Interval { } let { s } = this, - added, + idx = 1, next; const results = []; while (s < this.e) { - added = s.plus(dur); + const added = this.start.plus(dur.mapUnits(x => x * idx)); next = +added > +this.e ? this.e : added; results.push(Interval.fromDateTimes(s, next)); s = next; + idx += 1; } return results; @@ -428,7 +429,7 @@ export default class Interval { const s = this.s > other.s ? this.s : other.s, e = this.e < other.e ? this.e : other.e; - if (s > e) { + if (s >= e) { return null; } else { return Interval.fromDateTimes(s, e); |
