add: asign driver to vehicle

This commit is contained in:
Alexandro Uc Santos
2024-01-15 20:14:20 -06:00
parent a1a92c417d
commit ffa5070510
8 changed files with 310 additions and 55 deletions

View File

@@ -1,4 +1,32 @@
const months = [
"Enero",
"Febrero",
"Marzo",
"Abril",
"Mayo",
"Junio",
"Julio",
"Agosto",
"Septiembre",
"Octubre",
"Noviembre",
"Diciembre"
];
const monthsAbr = [
"Ene",
"Feb",
"Mar",
"Abr",
"May",
"Jun",
"Jul",
"Ago",
"Sep",
"Oct",
"Nov",
"Dic"
];
export const getDateMonthDay = (value) => {
const date = new Date(value)
@@ -11,6 +39,20 @@ export const getDateMonthDay = (value) => {
})
}
export const getDateMonthDayEs = (value, isFull = false) => {
const date = new Date(value)
let month = '';
if(isFull) {
month = months[date.getMonth()];
} else {
month = monthsAbr[date.getMonth()]
}
console.log(date.getMonth());
return `${month} ${date.getDate()}, ${date.getFullYear()}`;
}
export const getDateTime = (value, hour) => {
const date = new Date(value);