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 110 forks source link

Get DayName #64

Closed MkBahram closed 5 years ago

MkBahram commented 5 years ago

hi

i want to use getdayname like this :

$date = new jdate(true, true, 'Asia/Tehran');
$day = $date->mktime(0,0,0,10,10,1397);
echo $date->date("l", $day);

is there any easier than this way ?!!! i want set time and get day name .....?!!!

morilog commented 5 years ago

You can do it like this:

$date = new Jalalian(1397, 10, 10);
echo $date->format('l');