add: asign driver to vehicle
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user