Skip to content

Commit

Permalink
using en-dash and whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Maschga committed Sep 28, 2024
1 parent a07f746 commit 0645cc3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion assets/js/mixins/formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ export default {

if (weekdayRangeEnd - weekdayRangeStart > 1) {
// more than 2 consecutive weekdays selected
label += "-" + weekdays[weekdayRangeEnd];
label += "" + weekdays[weekdayRangeEnd];
weekdayRangeStart = weekdayRangeEnd;
if (maxWeekday !== weekdayRangeEnd) {
label += ", ";
Expand Down
4 changes: 2 additions & 2 deletions assets/js/mixins/formatter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ describe("getShortenedWeekdaysLabel", () => {
});
test("should format ranges", () => {
expect(fmt.getShortenedWeekdaysLabel([0, 1])).eq("Mo, Di");
expect(fmt.getShortenedWeekdaysLabel([0, 1, 2, 3, 4, 5, 6])).eq("Mo-So");
expect(fmt.getShortenedWeekdaysLabel([0, 1, 3, 4, 5])).eq("Mo, Di, Do-Sa");
expect(fmt.getShortenedWeekdaysLabel([0, 1, 2, 3, 4, 5, 6])).eq("MoSo");
expect(fmt.getShortenedWeekdaysLabel([0, 1, 3, 4, 5])).eq("Mo, Di, DoSa");
});
test("should format single days and ranges", () => {
expect(fmt.getShortenedWeekdaysLabel([0, 1, 3, 5, 6])).eq("Mo, Di, Do, Sa, So");
Expand Down

0 comments on commit 0645cc3

Please sign in to comment.