formatear fechas

This commit is contained in:
lizandrogd
2024-05-28 20:20:00 -05:00
parent db47a64182
commit 628824ad28
2 changed files with 7 additions and 6 deletions
+5 -4
View File
@@ -128,8 +128,8 @@ class ShowPlanes extends Component
$consulta_tarifas = Tarifas::take(1);
if (empty($this->fecha_inicial)) {
$this->fecha_inicial = Carbon::now()->format('Y-m-d');
$this->fecha_final = Carbon::now()->addDay(30)->format('Y-m-d');
$this->fecha_inicial = Carbon::now()->toDateTimeString();
$this->fecha_final = Carbon::now()->addDay(30)->toDateTimeString();
}
if ($this->servicio_modTarifas) {
$this->tarifas = Tarifas::with('rol')
@@ -222,8 +222,9 @@ class ShowPlanes extends Component
public function calcularFechas()
{
$this->fecha_inicial_renovar = now()->format('Y-m-d');
$this->fecha_final_renovar = now()->addDays(30)->format('Y-m-d');
$this->fecha_inicial_renovar = now()->format('Y-m-d H:i:s');
$this->fecha_final_renovar = now()->addDays(30)->format('Y-m-d H:i:s');
}
+2 -2
View File
@@ -26,8 +26,8 @@ class UsersImport implements ToModel
'correo' => $row[0],
'password' => $row[1],
'estado' => $row[2],
'inicio' => \PhpOffice\PhpSpreadsheet\Shared\Date::excelToDateTimeObject($row[3]),
'vencimiento' => \PhpOffice\PhpSpreadsheet\Shared\Date::excelToDateTimeObject($row[4]),
'inicio' => \PhpOffice\PhpSpreadsheet\Shared\Date::excelToDateTimeObject($row[3])->format('Y-m-d H:i:s'),
'vencimiento' => \PhpOffice\PhpSpreadsheet\Shared\Date::excelToDateTimeObject($row[4])->format('Y-m-d H:i:s'),
'servicio_id' => $row[5],
]);