mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-21 12:29:36 +02:00
Added option to set custom greetings. Moved HomeHeader to separate file. Cleaned up README file
This commit is contained in:
parent
4e20527834
commit
aca8b0261e
17 changed files with 149 additions and 124 deletions
|
@ -1,39 +0,0 @@
|
|||
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();
|
||||
|
||||
const useAmericanDate = localStorage.useAmericanDate === 'true';
|
||||
|
||||
if (!useAmericanDate) {
|
||||
return `${days[now.getDay()]}, ${now.getDate()} ${
|
||||
months[now.getMonth()]
|
||||
} ${now.getFullYear()}`;
|
||||
} else {
|
||||
return `${days[now.getDay()]}, ${
|
||||
months[now.getMonth()]
|
||||
} ${now.getDate()} ${now.getFullYear()}`;
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue