mirror of
https://github.com/devcode-it/openstamanager.git
synced 2024-12-27 00:06:14 +01:00
Bugfix date FE
This commit is contained in:
parent
9c970080a1
commit
30f54e3d31
@ -459,23 +459,19 @@ class FatturaElettronica
|
||||
}
|
||||
// Formattazione date
|
||||
elseif ($info['type'] == 'date') {
|
||||
$object = DateTime::createFromFormat('Y-m-d H:i:s', $value);
|
||||
$object = \DateTime::createFromFormat('Y-m-d H:i:s', $output);
|
||||
if (is_object($object)) {
|
||||
$output = $object->format('Y-m-d');
|
||||
}
|
||||
}
|
||||
// Formattazione testo
|
||||
elseif ($info['type'] == 'string') {
|
||||
$object = DateTime::createFromFormat('Y-m-d H:i:s', $value);
|
||||
if (is_object($object)) {
|
||||
$output = $object->format('Y-m-d');
|
||||
}
|
||||
}
|
||||
|
||||
// Riduzione delle dimensioni
|
||||
if ($info['type'] != 'integer' && isset($size[1])) {
|
||||
$output = trim($output);
|
||||
$output = S::create($output)->substr(2, $size[1]);
|
||||
$output = S::create($output)->substr(2, $size[1])->__toString();
|
||||
}
|
||||
|
||||
// Validazione
|
||||
|
Loading…
Reference in New Issue
Block a user