forked from jchomaz/Vulture
Tracking de l'application VApp (IHM du jeu)
This commit is contained in:
12
VApp/node_modules/vuetify/lib/components/VDatePicker/util/sanitizeDateString.mjs
generated
vendored
Normal file
12
VApp/node_modules/vuetify/lib/components/VDatePicker/util/sanitizeDateString.mjs
generated
vendored
Normal 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
|
||||
Reference in New Issue
Block a user