feature: the beginnings of chat working
This commit is contained in:
parent
85024c6e62
commit
649ff432bb
24 changed files with 1555 additions and 918 deletions
19
public/js/datetimeutils.js
Normal file
19
public/js/datetimeutils.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
function datetime_to_local(input) {
|
||||
const local_datetime = new Date(input);
|
||||
|
||||
return {
|
||||
long: local_datetime.toLocaleString("en-US", {
|
||||
year: "numeric",
|
||||
month: "long",
|
||||
day: "numeric",
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
hour12: true,
|
||||
}),
|
||||
|
||||
short: local_datetime.toLocaleString("en-US", {
|
||||
timeStyle: "short",
|
||||
hour12: true,
|
||||
}),
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue