Skip to content

Commit

Permalink
Update frontend/src/components/inputs/DateTime.vue date conversion to…
Browse files Browse the repository at this point in the history
… more readable version

Co-authored-by: Andreas Hasenkopf <[email protected]>
  • Loading branch information
TeodoraPavlova and crazyscientist authored Apr 10, 2024
1 parent d262738 commit 827c983
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions frontend/src/components/inputs/DateTime.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,7 @@ export default {
date = new Date(date)
}
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, "0");
const day = date.getDate().toString().padStart(2, "0");
const hours = date.getHours().toString().padStart(2, "0");
const minutes = date.getMinutes().toString().padStart(2, "0");
return `${year}-${month}-${day}T${hours}:${minutes}:00`;
return date.toISOString().substring(0, 16);
}
},
};
Expand Down

0 comments on commit 827c983

Please sign in to comment.