Skip to content

Commit

Permalink
add first zero if smaller 10
Browse files Browse the repository at this point in the history
  • Loading branch information
Elblinator committed May 14, 2024
1 parent 717f5ec commit 944573f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export class MeetingControllerService extends BaseController<ViewMeeting, Meetin
}
const date = new Date(time);
const month = date.getMonth() + 1 > 9 ? `${date.getMonth() + 1}` : `0${date.getMonth() + 1}`;
return `${date.getFullYear()}-${month}-${date.getDate()}`;
const day = date.getDate() > 9 ? `${date.getDate()}` : `0${date.getDate()}`;
return `${date.getFullYear()}-${month}-${day}`;
}
}

0 comments on commit 944573f

Please sign in to comment.