Files
test-repo/scripts/release/get-formatted-date.js
T
2025-12-01 07:25:25 +08:00

12 lines
326 B
JavaScript

// TODO: Implement this in `utilities.js` when jest.importActual is landed.
export default function getFormattedDate() {
const date = new Date();
const isoStr = date.toISOString();
const year = isoStr.slice(0, 4);
const month = isoStr.slice(5, 7);
const day = isoStr.slice(8, 10);
return { year, month, day };
}