I wonder why this php code gives incorrect output value.
dd(new \DateTime("1397/02/29", new \DateTimeZone('Asia/Tehran')));
It outputs below object:
DateTime @-18076965944 {#1256 ▼
date: 1397-03-01 00:00:00.0 Asia/Tehran (+03:25)
}
As you see the date is incorrect and must be 1397-02-01
.
The output for values 1397/02/30 && 1397/02/31
is incorrect also.
Can anyone help please. thanks.