mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 12:36:57 +00:00
11 lines
315 B
TypeScript
11 lines
315 B
TypeScript
const formatDate = (inputDate: any) => {
|
|
// TODO fix type
|
|
const date = new Date(inputDate);
|
|
const day = String(date.getDate()).padStart(2, "0");
|
|
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
const year = date.getFullYear();
|
|
return `${day}/${month}/${year}`;
|
|
};
|
|
|
|
export default formatDate;
|