Skip to content

Commit 8963c8f

Browse files
authored
Merge pull request #319 from Vanilla-OS/updates
feat(updates): use iso 8601 format
2 parents 9b99876 + 2b23c72 commit 8963c8f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/views/Updates.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ export default defineComponent({
131131
}
132132
},
133133
formatDate(dateString: string): string {
134-
const [month, day, year] = dateString.split('-');
135-
const date = new Date(`${year}-${month}-${day}T00:00:00`);
134+
const date = new Date(dateString);
136135
return date.toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' });
137136
},
138137
},
@@ -144,7 +143,7 @@ export default defineComponent({
144143
day: date,
145144
bugs: data[date].bugs,
146145
enhancements: data[date].enhancements,
147-
})).sort((a, b) => new Date(b.day).getTime() - new Date(a.day).getTime());
146+
}));
148147
this.loadIndex = this.loadIncrement;
149148
this.displayedDays = this.days.slice(0, this.loadIndex);
150149
});

0 commit comments

Comments
 (0)