Open ErfanBahramali opened 10 months ago
Hi
Apparently, there are problems in calculating the past time
Code:
use Morilog\Jalali\Jalalian; $date = Jalalian::fromDateTime('2009-03-20 00:00:00'); $result = $date->subYears(1); // or (new Jalalian(1387, 12, 30))->subYears(1);
Result:
Its because of your input, ESFAND at 1387 has not 30 days
OK, so 365 days before should be calculated It should not give an error
Hi
Apparently, there are problems in calculating the past time
Code:
Result: