Files
test-repo/scripts/release/get-formatted-date.js
T
Sosuke Suzukiandfisker Cheung 96795dc2b3 Adds more info for release URL (#11492)
* Add getReleaseUrl function

* Implement

* Add emoji

* tmp

* Update jest

* Test works

* Add comment

* Empty lines to tigger netlify build

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-09-11 16:20:26 +09:00

9 lines
329 B
JavaScript

// TODO: Implement this in `utils.js` when jest.importActual is landed.
export default function getFormattedDate() {
const date = new Date();
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, "0");
const day = String(date.getDate()).padStart(2, "0");
return { year, month, day };
}