NullcatChan/utils/get-date.ts
2022-09-18 00:16:06 +09:00

9 lines
199 B
TypeScript

export default function (): string {
const now = new Date();
const y = now.getFullYear();
const m = now.getMonth();
const d = now.getDate();
const today = `${y}/${m + 1}/${d}`;
return today;
}