Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
338 B
JavaScript
Raw Permalink Normal View History

2025-12-01 07:25:25 +08:00
// TODO: Implement this in `utilities.js` when jest.importActual is landed.
2021-09-11 16:20:26 +09:00
export default function getFormattedDate() {
const date = new Date();
const isoString = date.toISOString();
2024-01-13 03:42:19 +09:00
const year = isoString.slice(0, 4);
const month = isoString.slice(5, 7);
const day = isoString.slice(8, 10);
2024-01-13 03:42:19 +09:00
2021-09-11 16:20:26 +09:00
return { year, month, day };
}