Skip to content

Commit

Permalink
fix: minutes pad zero
Browse files Browse the repository at this point in the history
  • Loading branch information
45gfg9 committed Feb 20, 2024
1 parent 157e660 commit c952a64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/views/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const scoreFn = d => d.composition.reduce((acc, cur) => acc + cur.score, 0);
const formatDate = d => {
d = new Date(d);
return `${d.getFullYear()}${d.getMonth() + 1}${d.getDate()}${d.getHours()}:${d.getMinutes()}`;
return `${d.getFullYear()}${d.getMonth() + 1}${d.getDate()}${d.getHours()}:${String(d.getMinutes()).padStart(2, '0')}`;
};
const getData = async () => {
Expand Down Expand Up @@ -59,4 +59,4 @@ onMounted(async () => {
margin: 0 auto;
padding: 0 20px;
}
</style>
</style>

0 comments on commit c952a64

Please sign in to comment.