#5 modifica della funzione dateFormat per bug segnalato
This commit is contained in:
parent
0a520d514a
commit
eea34b5b52
@ -213,12 +213,14 @@ class Movimenti extends Model
|
|||||||
|
|
||||||
private static function dateFormat($type,$string)
|
private static function dateFormat($type,$string)
|
||||||
{
|
{
|
||||||
$string=$string->format('d/m/Y');
|
|
||||||
if($type)
|
if($type)
|
||||||
{
|
{
|
||||||
|
$string=$string->format('Y-m-d');
|
||||||
list($year,$month,$day) = explode('-',$string);
|
list($year,$month,$day) = explode('-',$string);
|
||||||
return $day.'/'.$month.'/'.$year;
|
return $day.'/'.$month.'/'.$year;
|
||||||
} else {
|
} else {
|
||||||
|
$string=$string->format('d/m/Y');
|
||||||
list($day,$month,$year) =explode('/',$string);
|
list($day,$month,$year) =explode('/',$string);
|
||||||
return $year.'-'.$month.'-'.$day;
|
return $year.'-'.$month.'-'.$day;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user