When enter date 31-06 in jalali year (for example 1397-06-31) to php date function, the output shows one day after that!
<?php
$date = date_create('1397-06-31');
echo date_format($date, 'Y-m-d');
// the output is 1397-07-01
?>
How i can fix it?
When enter date 31-06 in jalali year (for example 1397-06-31) to php date function, the output shows one day after that!
<?php
$date = date_create('1397-06-31');
echo date_format($date, 'Y-m-d');
// the output is 1397-07-01
?>
How i can fix it?
You didn't enter a Jalali date, you entered a date ~600 years ago.
June 31st didn't exist that year in your timezone, which is why it skips one day ahead.