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();
|
2026-09-23 13:09:48 +08:00
|
|
|
const isoString = date.toISOString();
|
2024-01-13 03:42:19 +09:00
|
|
|
|
2026-09-23 13:09:48 +08: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 };
|
|
|
|
|
}
|