diff options
| author | 2022-04-20 00:13:08 -0400 | |
|---|---|---|
| committer | 2022-04-20 00:13:08 -0400 | |
| commit | aca2787b50094a4ab1f17162aa92c5263858743e (patch) | |
| tree | c227d3a22fe454f92162d8d91ecb81f3141ace94 /npm_assets/node_modules/luxon/src/interval.js | |
| parent | 78e717290e125cab92aef712f12ae63fedb4070f (diff) | |
| parent | 942e313727d1ad886a1024c24fe4a9e8e2e0bb3e (diff) | |
Update upstream source from tag 'upstream/8.2.0'
Update to upstream version '8.2.0'
with Debian dir 65d01d7d78d6b41c0be6eb196ed84354526f9384
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); |
