morilog / jalali

This Package helps developers to easily work with Jalali (Shamsi or Iranian) dates in php appliations, based on Jalali (Shamsi) DateTime class.
MIT License
861 stars 108 forks source link

Wrong value for day of the year #13

Closed mdaliyan closed 6 years ago

mdaliyan commented 7 years ago

The day of the year (starting from 0): function.date.php

$j = jDate::forge(1458432001, 'UTC');
echo $j->format('Y-m-d H:i:s --z') . "\n";    // 1395-01-01 00:00:01 --1

$d = DateTime::createFromFormat('Y-m-d H:i:s', '2016-01-01 00:00:01', new DateTimeZone('UTC'));
echo $d->format('Y-m-d H:i:s --z') . "\n";    // 2016-01-01 00:00:01 --0
mdaliyan commented 6 years ago

?!