Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
deadline fout weergegeven
Browse files Browse the repository at this point in the history
  • Loading branch information
cstefc committed May 23, 2024
1 parent 2f47b6f commit bba7236
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/src/utils/ApiInterfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface Course {
export interface Project {
project_id: number,
project_name: string,
project_deadline: string | Date,
project_deadline: string,
project_archived: boolean,
project_description: string,
project_requirements: string,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/utils/BackendInterfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface Backend_Course {
export interface Backend_Project {
id: number,
name: string,
deadline: string | Date,
deadline: string,
archived: boolean,
description: string,
requirements: string,
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/utils/helper.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

export function deadline_to_string(deadline: Date | string){
export function deadline_to_string(deadline: string){
const deadline_date = new Date(deadline)
const hours = String(deadline_date.getHours()).padStart(2, '0');
const minutes = String(deadline_date.getMinutes()).padStart(2, '0');
const day = String(deadline_date.getDate()).padStart(2, '0');
const month = String(deadline_date.getMonth()).padStart(2, '0');
const month = String(deadline_date.getMonth() + 1).padStart(2, '0');

return `${hours}:${minutes} - ${day}/${month}/${deadline_date.getFullYear()}`;

Expand Down

0 comments on commit bba7236

Please sign in to comment.