bkiani Posted August 11, 2016 Share Posted August 11, 2016 HelloI was in my invoice indicating the date of the order I added this code in (invoice.php) file <td class="main"><strong><?php echo TEXT_DATE_ORDER_CREATED; ?></strong></td> <td class="main"><?php echo $order->info['date_purchased']; ?></td> Gregorian date to be inserted But do not know how I turned to the jalali date using 2.3.4 ver please help me Link to comment Share on other sites More sharing options...
MrPhil Posted August 11, 2016 Share Posted August 11, 2016 If $order->info['date_purchased'] is a string with a Western (Gregorian) format date, and you want to display it as Jalali format, you would have to find a conversion routine and add it to your code (both the function and wrapping a call to this function around that string). http://www.phpclasses.org/package/6733-PHP-Convert-dates-between-Gregorian-to-Jalali-formats.html might be useful to you. I don't think there's anything built in to PHP to directly do such formatting or conversion, but it wouldn't hurt to do a quick search. Keep in mind that if you have customers outside Iran/Afghanistan who might be using your page and would prefer Gregorian dates, to make the conversion conditional on some sort of switch. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.