1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-21 12:29:36 +02:00

Added auto-refresh for greeting and date. Fixed multiple React warnings

This commit is contained in:
unknown 2021-06-13 01:06:42 +02:00
parent d257fbf9a3
commit f137498e7e
16 changed files with 121 additions and 59 deletions

View file

@ -0,0 +1,8 @@
export const dateTime = (): string => {
const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
const now = new Date();
return `${days[now.getDay()]}, ${now.getDate()} ${months[now.getMonth()]} ${now.getFullYear()}`;
}