mirror of
https://github.com/lemeow125/Ivy-Frontend.git
synced 2025-05-15 19:08:11 +08:00
Moved get date today to separate component
This commit is contained in:
parent
9f0bbd7a66
commit
7dc3729bec
2 changed files with 13 additions and 12 deletions
11
src/Components/LogsPage/GetToday/GetToday.tsx
Normal file
11
src/Components/LogsPage/GetToday/GetToday.tsx
Normal file
|
@ -0,0 +1,11 @@
|
|||
export default function GetToday() {
|
||||
const current = new Date();
|
||||
const date =
|
||||
("0" + (current.getMonth() + 1)).slice(-2) +
|
||||
"-" +
|
||||
("0" + current.getDate()).slice(-2) +
|
||||
"-" +
|
||||
current.getFullYear();
|
||||
console.log("Today is " + date);
|
||||
return date;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue