mirror of
https://github.com/moghtech/komodo.git
synced 2026-09-08 00:01:07 +00:00
fix short date formatting
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { Types } from "@monitor/client";
|
||||
|
||||
export const fmt_date = (d: Date) => {
|
||||
return `${d.getDate()}/${
|
||||
d.getMonth() + 1
|
||||
} @ ${d.getHours()}:${d.getMinutes()}`;
|
||||
const minutes = d.getMinutes();
|
||||
return `${d.getDate()}/${d.getMonth() + 1} @ ${d.getHours()}:${
|
||||
minutes > 9 ? minutes : "0" + minutes
|
||||
}`;
|
||||
};
|
||||
|
||||
export const fmt_date_with_minutes = (d: Date) => {
|
||||
@@ -37,4 +38,4 @@ export function snake_case_to_upper_space_case(snake: string) {
|
||||
.split("_")
|
||||
.map((item) => item[0].toUpperCase() + item.slice(1))
|
||||
.join(" ");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user