1
0
forked from jchomaz/Vulture

Tracking de l'application VApp (IHM du jeu)

This commit is contained in:
2025-05-11 18:04:12 +02:00
commit 89e9db9b62
17763 changed files with 3718499 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
// Adds leading zero to month/day if necessary, returns 'YYYY' if type = 'year',
// 'YYYY-MM' if 'month' and 'YYYY-MM-DD' if 'date'
import pad from "./pad.mjs";
export default ((dateString, type) => {
const [year, month = 1, date = 1] = dateString.split('-');
return `${year}-${pad(month)}-${pad(date)}`.substr(0, {
date: 10,
month: 7,
year: 4
}[type]);
});
//# sourceMappingURL=sanitizeDateString.mjs.map