generated from Luis/nextjs-python-web-template
current progress with diagram and project fixes
This commit is contained in:
committed by
Sara Pervana
parent
60205b3c22
commit
c03da10e98
@@ -1,5 +1,6 @@
|
||||
export const formatDateTime = (date: string) => {
|
||||
const _date = new Date(date);
|
||||
export const formatDateTime = (date: string | number) => {
|
||||
const dateToFormat = typeof date === "number" ? date * 1000 : date;
|
||||
const _date = new Date(dateToFormat);
|
||||
return _date.toLocaleDateString("en-US", {
|
||||
year: "numeric",
|
||||
month: "long",
|
||||
|
||||
Reference in New Issue
Block a user