NullcatChan/src/utils/get-date.ts
2018-08-28 09:12:59 +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;
}