Skip to content

Commit

Permalink
fix(Event): Return floating repeating until/excluded dates if floating
Browse files Browse the repository at this point in the history
close #442
  • Loading branch information
sebbo2002 committed Dec 20, 2022
1 parent 85b3016 commit 011123e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1491,7 +1491,7 @@ export default class ICalEvent {
}

if (this.data.repeating.until) {
g += ';UNTIL=' + formatDate(this.calendar.timezone(), this.data.repeating.until);
g += ';UNTIL=' + formatDate(this.calendar.timezone(), this.data.repeating.until, false, this.floating());
}

if (this.data.repeating.byDay) {
Expand Down Expand Up @@ -1534,7 +1534,7 @@ export default class ICalEvent {
}
else {
g += ':' + this.data.repeating.exclude.map(excludedDate => {
return formatDate(this.timezone(), excludedDate);
return formatDate(this.timezone(), excludedDate, false, this.floating());
}).join(',') + '\r\n';
}
}
Expand Down
5 changes: 5 additions & 0 deletions test/issues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,4 +210,9 @@ describe('Issues', function () {
].join('\r\n'));
});
});

describe('Issue #442', function () {
it('should generate floating repeat until value if event is a floating event');
it('should generate floating repeat exclusion dates if event is a floating event');
});
});

0 comments on commit 011123e

Please sign in to comment.