Jump to content

convert date from Gregorian to Solar(Jalali)


mohammad50

Recommended Posts

hi

at version 5 of whmcs for converting dates from Gregorian to solar(Jalali) in viewinvoice.tpl file

 

first i add this line at top of viewinvoice.tpl file:

{php}include('jdf.php');{/php}

 

then i replace {$datecreated} by folowing line

{php}echo $shamsi = jdate("Y/m/d", strtotime($this->_tpl_vars["datecreated"]));{/php}

 

but i cant use this method at version 6

do you have any solution for this problem ?

 

download jdf.php link —-> http://jdf.scr.ir/download/dl.php

 

—----------------------

code to convert Gregorian to Solar(Jalali)

include('jdf.php');

$Gregorian_date = "2016/01/16";

$Gregorian_date = strtotime($Gregorian_date);

$solar_date = jdate("Y/m/d", $Gregorian_date);

echo $solar_date;

—----------------------

 

thank you

excuse me for my poor english

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated