Files
test-repo/scripts/release/get-formatted-date.js
T

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

11 lines
326 B
JavaScript
Raw 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();
2024-01-13 03:42:19 +09:00
const isoStr = date.toISOString();
const year = isoStr.slice(0, 4);
const month = isoStr.slice(5, 7);
const day = isoStr.slice(8, 10);
2021-09-11 16:20:26 +09:00
return { year, month, day };
}